From: "Luke Yang" <luke.adi@gmail.com>
To: "Nick Piggin" <nickpiggin@yahoo.com.au>
Cc: linux-kernel@vger.kernel.org, "Andrew Morton" <akpm@osdl.org>,
"Nick Piggin" <npiggin@suse.de>
Subject: Re: [PATCH] nommu page refcount bug fixing
Date: Thu, 30 Mar 2006 17:00:09 +0800 [thread overview]
Message-ID: <489ecd0c0603300100o7e9293b4mbde4340b0129e5d5@mail.gmail.com> (raw)
In-Reply-To: <489ecd0c0603300056t272b4d22g8501302f4f86fc85@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]
> > 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
[-- Attachment #2: nommu_use_compound_page_in_slab.patch --]
[-- Type: text/x-patch, Size: 475 bytes --]
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);
next prev parent reply other threads:[~2006-03-30 9:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-30 3:05 Luke Yang
2006-03-30 3:22 ` Nick Piggin
2006-03-30 8:56 ` Luke Yang
2006-03-30 9:00 ` Luke Yang [this message]
2006-03-30 9:07 ` Nick Piggin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=489ecd0c0603300100o7e9293b4mbde4340b0129e5d5@mail.gmail.com \
--to=luke.adi@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=npiggin@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome