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 16:56:34 +0800 [thread overview]
Message-ID: <489ecd0c0603300056t272b4d22g8501302f4f86fc85@mail.gmail.com> (raw)
In-Reply-To: <442B4EEB.6020407@yahoo.com.au>
[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]
On 3/30/06, Nick Piggin <nickpiggin@yahoo.com.au> wrote:
> Luke Yang wrote:
>
> Yep, sorry this slipped into the kernel. It's my fault for not giving
> Andrew a fix for it.
>
> As you might know, page refcounting in nommu was already broken, so
> I'm working on a proper solution to fix it.
>
> In the meantime though, this is a step backwards and reintroduces
> 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:
Signed-off-by: Luke Yang <luke.adi@gmail.com>
diff --git a/mm/slab.c b/mm/slab.c
index 4cbf8bb..f93d3d5 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1454,7 +1454,7 @@ static void *kmem_getpages(struct kmem_c
int i;
flags |= cachep->gfpflags;
- page = alloc_pages_node(nodeid, flags, cachep->gfporder);
+ page = alloc_pages_node(nodeid, (flags | __GFP_COMP), cachep->gfporder);
if (!page)
return NULL;
addr = page_address(page);
--
Best regards,
Luke Yang (Kernel for Blackfin maintainer)
luke.adi@gmail.com
[-- Attachment #2: nommu_use_compound_page_in_slab.patch --]
[-- Type: text/x-patch, Size: 440 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..f93d3d5 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1454,7 +1454,7 @@ static void *kmem_getpages(struct kmem_c
int i;
flags |= cachep->gfpflags;
- page = alloc_pages_node(nodeid, flags, cachep->gfporder);
+ page = alloc_pages_node(nodeid, (flags | __GFP_COMP), cachep->gfporder);
if (!page)
return NULL;
addr = page_address(page);
next prev parent reply other threads:[~2006-03-30 8:56 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 [this message]
2006-03-30 9:00 ` Luke Yang
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=489ecd0c0603300056t272b4d22g8501302f4f86fc85@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
all inboxes | Powered by JetHome®