* [PATCH] vmalloc: Add __get_vm_area_caller()
@ 2009-02-11 4:48 Benjamin Herrenschmidt
2009-02-11 8:22 ` KOSAKI Motohiro
0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2009-02-11 4:48 UTC (permalink / raw)
To: Linux Memory Management; +Cc: linuxppc-dev, linux-kernel, Andrew Morton
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.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
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(+)
--- linux-work.orig/include/linux/vmalloc.h 2009-02-04 15:33:35.000000000 +1100
+++ linux-work/include/linux/vmalloc.h 2009-02-04 15:33:47.000000000 +1100
@@ -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);
Index: linux-work/mm/vmalloc.c
===================================================================
--- linux-work.orig/mm/vmalloc.c 2009-02-04 15:32:47.000000000 +1100
+++ linux-work/mm/vmalloc.c 2009-02-04 15:33:25.000000000 +1100
@@ -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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] vmalloc: Add __get_vm_area_caller()
2009-02-11 4:48 [PATCH] vmalloc: Add __get_vm_area_caller() Benjamin Herrenschmidt
@ 2009-02-11 8:22 ` KOSAKI Motohiro
2009-02-11 22:45 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: KOSAKI Motohiro @ 2009-02-11 8:22 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: kosaki.motohiro, Linux Memory Management, linuxppc-dev,
linux-kernel, Andrew Morton
> 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.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
It seems reasonable reason and this patch looks good to me :)
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> 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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] vmalloc: Add __get_vm_area_caller()
2009-02-11 8:22 ` KOSAKI Motohiro
@ 2009-02-11 22:45 ` Andrew Morton
2009-02-11 23:53 ` KOSAKI Motohiro
2009-02-12 0:11 ` Benjamin Herrenschmidt
0 siblings, 2 replies; 5+ messages in thread
From: Andrew Morton @ 2009-02-11 22:45 UTC (permalink / raw)
To: KOSAKI Motohiro
Cc: benh, kosaki.motohiro, linux-mm, linuxppc-dev, linux-kernel
On Wed, 11 Feb 2009 17:22:47 +0900 (JST)
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > 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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] vmalloc: Add __get_vm_area_caller()
2009-02-11 22:45 ` Andrew Morton
@ 2009-02-11 23:53 ` KOSAKI Motohiro
2009-02-12 0:11 ` Benjamin Herrenschmidt
1 sibling, 0 replies; 5+ messages in thread
From: KOSAKI Motohiro @ 2009-02-11 23:53 UTC (permalink / raw)
To: Andrew Morton; +Cc: kosaki.motohiro, benh, linux-mm, linuxppc-dev, linux-kernel
> On Wed, 11 Feb 2009 17:22:47 +0900 (JST)
> KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
>
> > > 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?
I think this patch obiously doesn't have any regression risk.
I obey your judgement.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] vmalloc: Add __get_vm_area_caller()
2009-02-11 22:45 ` Andrew Morton
2009-02-11 23:53 ` KOSAKI Motohiro
@ 2009-02-12 0:11 ` Benjamin Herrenschmidt
1 sibling, 0 replies; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2009-02-12 0:11 UTC (permalink / raw)
To: Andrew Morton; +Cc: KOSAKI Motohiro, linux-mm, linuxppc-dev, linux-kernel
On Wed, 2009-02-11 at 14:45 -0800, Andrew Morton wrote:
> On Wed, 11 Feb 2009 17:22:47 +0900 (JST)
> KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
>
> > > 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?
That would be best.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-02-12 0:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-11 4:48 [PATCH] vmalloc: Add __get_vm_area_caller() Benjamin Herrenschmidt
2009-02-11 8:22 ` KOSAKI Motohiro
2009-02-11 22:45 ` Andrew Morton
2009-02-11 23:53 ` KOSAKI Motohiro
2009-02-12 0:11 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).