From: "Pekka Enberg" <penberg@cs.helsinki.fi>
To: "Luke Yang" <luke.adi@gmail.com>
Cc: "Nick Piggin" <npiggin@suse.de>, "Andrew Morton" <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix mm regression bug: nommu use compound page in slab allocator
Date: Sat, 8 Apr 2006 19:55:05 +0300 [thread overview]
Message-ID: <84144f020604080955kd7d1fd5ge3b47dc6a268c6a0@mail.gmail.com> (raw)
In-Reply-To: <489ecd0c0603301811u3c8b6ac3lbe03a93a92bebf44@mail.gmail.com>
Hi Luke,
On 3/31/06, Luke Yang <luke.adi@gmail.com> wrote:
> The earlier patch to consolidate mmu and nommu page allocation
> and refcounting by using compound pages for nommu allocations
> had a bug: kmalloc slabs who's pages were initially allocated
> by a non-__GFP_COMP allocator could be passed into mm/nommu.c
> kmalloc allocations which really wanted __GFP_COMP underlying
> pages. Fix that by having nommu pass __GFP_COMP to all higher order
> slab allocations.
Any reason we are not doing this for CONFIG_MMU as well? We could then
fix the slab callers to not pass __GFP_COMP at all which seems broken
anyway.
Pekka
> Signed-off-by: Luke Yang <luke.adi@gmail.com>
> Acked-by: Nick Piggin <npiggin@suse.de>
>
> slab.c | 4 ++++
> 1 files changed, 4 insertions(+)
>
> 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);
prev parent reply other threads:[~2006-04-08 16:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-31 2:11 Luke Yang
2006-04-08 16:55 ` Pekka Enberg [this message]
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=84144f020604080955kd7d1fd5ge3b47dc6a268c6a0@mail.gmail.com \
--to=penberg@cs.helsinki.fi \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luke.adi@gmail.com \
--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®