Re: [PATCH] nommu page refcount bug fixing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > 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 <[email protected]>

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)
> [email protected]
>
>
>


--
Best regards,
Luke Yang
[email protected]
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);

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux