Messages in this thread Patches in this message | | | Date | Thu, 30 Mar 2006 17:00:09 +0800 | From | "Luke Yang" <> | Subject | Re: [PATCH] nommu page refcount bug fixing |
| |
> > NOMMU special-casing in page refcounting. As a temporary fix, what I > > think should happen is simply for all slab allocations to ask for > > __GFP_COMP pages. > > > > Could you check that fixes your problem? > It works. What's your plan to modify nommu mm? I would like to > help. And I am also interested in implementing the "non-power-of-2" > allocator in 2.6. > > New patch: Sorry! Previous patch only works for nommu... Here's the correct one: Signed-off-by: Luke Yang <luke.adi@gmail.com>
diff --git a/mm/slab.c b/mm/slab.c index 4cbf8bb..388a6a9 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1454,7 +1454,11 @@ static void *kmem_getpages(struct kmem_c int i;
flags |= cachep->gfpflags; +#ifdef CONFIG_MMU page = alloc_pages_node(nodeid, flags, cachep->gfporder); +#else + page = alloc_pages_node(nodeid, (flags | __GFP_COMP), cachep->gfporder); +#endif if (!page) return NULL; addr = page_address(page); > -- > Best regards, > Luke Yang (Kernel for Blackfin maintainer) > luke.adi@gmail.com > > >
-- Best regards, Luke Yang luke.adi@gmail.com diff --git a/mm/page_alloc.c b/mm/page_alloc.c diff --git a/mm/slab.c b/mm/slab.c index 4cbf8bb..388a6a9 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1454,7 +1454,11 @@ static void *kmem_getpages(struct kmem_c int i; flags |= cachep->gfpflags; +#ifdef CONFIG_MMU page = alloc_pages_node(nodeid, flags, cachep->gfporder); +#else + page = alloc_pages_node(nodeid, (flags | __GFP_COMP), cachep->gfporder); +#endif if (!page) return NULL; addr = page_address(page); | |