lkml.org 
[lkml]   [2006]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
SubjectRe: [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);
\
 
 \ /
  Last update: 2006-03-30 11:02    [W:0.050 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site