Skip to contentSkip to conversation

vmalloc: Add __get_vm_area_caller()

PATCH In review Benjamin Herrenschmidt 3 participants 8 messages Feb 11, 2009 – Feb 12, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vmalloc: Add __get_vm_area_caller()

We have get_vm_area_caller() and __get_vm_area() but not __get_vm_area_caller()

On powerpc, I use __get_vm_area() to separate the ranges of addresses given to vmalloc vs. ioremap (various good reasons for that) so in order to be able to implement the new caller tracking in /proc/vmallocinfo, I need a "_caller" variant of it.

---

I want to put into powerpc-next patches relying into that, so if the patch is ok with you guys, can I stick it in powerpc.git ?

 include/linux/vmalloc.h |    3 +++
 mm/vmalloc.c            |    8 ++++++++
 2 files changed, 11 insertions(+)
include/linux/vmalloc.h +3 -0
@@ -84,6 +84,9 @@ extern struct vm_struct *get_vm_area_cal
 					unsigned long flags, void *caller);
 extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags,
 					unsigned long start, unsigned long end);
+extern struct vm_struct *__get_vm_area_caller(unsigned long size, unsigned long flags,
+					      unsigned long start, unsigned long end,
+					      void *caller);
 extern struct vm_struct *get_vm_area_node(unsigned long size,
 					  unsigned long flags, int node,
 					  gfp_t gfp_mask);
mm/vmalloc.c +8 -0
Index: linux-work/mm/vmalloc.c
===================================================================
@@ -1106,6 +1106,14 @@ struct vm_struct *__get_vm_area(unsigned
 }
 EXPORT_SYMBOL_GPL(__get_vm_area);
 
+struct vm_struct *__get_vm_area_caller(unsigned long size, unsigned long flags,
+				       unsigned long start, unsigned long end,
+				       void *caller)
+{
+	return __get_vm_area_node(size, flags, start, end, -1, GFP_KERNEL,
+				  caller);
+}
+
 /**
  *	get_vm_area  -  reserve a contiguous kernel virtual area
  *	@size:		size of the area
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines

We have get_vm_area_caller() and __get_vm_area() but not __get_vm_area_caller()

On powerpc, I use __get_vm_area() to separate the ranges of addresses given to vmalloc vs. ioremap (various good reasons for that) so in order to be able to implement the new caller tracking in /proc/vmallocinfo, I need a "_caller" variant of it.

It seems reasonable reason and this patch looks good to me :)

Quoted 2 lines

I want to put into powerpc-next patches relying into that, so if the patch is ok with you guys, can I stick it in powerpc.git ?

hm.
Generally, all MM patch should merge into -mm tree at first. but I don't think this patch have conflict risk.

Andrew, What do you think?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

maintainer
#2 lore raw
Quoted 8 lines · On Wed, 11 Feb 2009 17:22:47 +0900 (JST) KOSAKI Motohiro…
Quoted 2 lines

I want to put into powerpc-next patches relying into that, so if the patch is ok with you guys, can I stick it in powerpc.git ?

hm.
Generally, all MM patch should merge into -mm tree at first. but I don't think this patch have conflict risk.

Andrew, What do you think?

We can sneak it into mainline later in the week?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#3 lore raw
Quoted 6 lines
Quoted 3 lines · On Wed, 11 Feb 2009 17:22:47 +0900 (JST) KOSAKI Motohiro…
Quoted 2 lines

I want to put into powerpc-next patches relying into that, so if the patch is ok with you guys, can I stick it in powerpc.git ?

Quoted 7 lines
Quoted 5 lines

hm.
Generally, all MM patch should merge into -mm tree at first. but I don't think this patch have conflict risk.

Andrew, What do you think?

We can sneak it into mainline later in the week?

I think this patch obiously doesn't have any regression risk. I obey your judgement.

#4 lore raw
In reply to Andrew Morton
Quoted 6 lines · Andrew Morton
Quoted 3 lines · On Wed, 11 Feb 2009 17:22:47 +0900 (JST) KOSAKI Motohiro…
Quoted 2 lines

I want to put into powerpc-next patches relying into that, so if the patch is ok with you guys, can I stick it in powerpc.git ?

Quoted 7 lines
Quoted 5 lines

hm.
Generally, all MM patch should merge into -mm tree at first. but I don't think this patch have conflict risk.

Andrew, What do you think?

We can sneak it into mainline later in the week?

That would be best.

Cheers,
Ben.

#5 lore raw
In reply to Andrew Morton
Quoted 6 lines · Andrew Morton
Quoted 3 lines · On Wed, 11 Feb 2009 17:22:47 +0900 (JST) KOSAKI Motohiro…
Quoted 2 lines

I want to put into powerpc-next patches relying into that, so if the patch is ok with you guys, can I stick it in powerpc.git ?

Quoted 7 lines
Quoted 5 lines

hm.
Generally, all MM patch should merge into -mm tree at first. but I don't think this patch have conflict risk.

Andrew, What do you think?

We can sneak it into mainline later in the week?

That would be best.

Cheers,
Ben.

#6 lore raw
In reply to Andrew Morton
Quoted 6 lines · Andrew Morton
Quoted 3 lines · On Wed, 11 Feb 2009 17:22:47 +0900 (JST) KOSAKI Motohiro…
Quoted 2 lines

I want to put into powerpc-next patches relying into that, so if the patch is ok with you guys, can I stick it in powerpc.git ?

Quoted 7 lines
Quoted 5 lines

hm.
Generally, all MM patch should merge into -mm tree at first. but I don't think this patch have conflict risk.

Andrew, What do you think?

We can sneak it into mainline later in the week?

That would be best.

Cheers,
Ben.

#7 lore raw
In reply to Andrew Morton
Quoted 6 lines · Andrew Morton
Quoted 3 lines · On Wed, 11 Feb 2009 17:22:47 +0900 (JST) KOSAKI Motohiro…
Quoted 2 lines

I want to put into powerpc-next patches relying into that, so if the patch is ok with you guys, can I stick it in powerpc.git ?

Quoted 7 lines
Quoted 5 lines

hm.
Generally, all MM patch should merge into -mm tree at first. but I don't think this patch have conflict risk.

Andrew, What do you think?

We can sneak it into mainline later in the week?

That would be best.

Cheers,
Ben.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>