public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-kernel@vger.kernel.org, Matt Mackall <mpm@selenic.com>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Christoph Lameter <cl@linux-foundation.org>
Subject: Re: [PATCH] Do not pass the SLAB flags as GFP in slob kmem_cache_create
Date: Wed, 10 Dec 2008 22:34:21 +0300	[thread overview]
Message-ID: <20081210193421.GA2215@localhost> (raw)
In-Reply-To: <20081210173632.19697.67688.stgit@pc1117.cambridge.arm.com>

[Catalin Marinas - Wed, Dec 10, 2008 at 05:36:33PM +0000]
| It looks like the kmem_cache_create() function in the slob allocator
| passes the SLAB flags as GFP flags to the slob_alloc() function. The
| patch changes this call to pass GFP_KERNEL as the other allocators seem
| to do.
| 
| Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
| Cc: Matt Mackall <mpm@selenic.com>
| ---
|  mm/slob.c |    2 +-
|  1 files changed, 1 insertions(+), 1 deletions(-)
| 
| diff --git a/mm/slob.c b/mm/slob.c
| index ff5a98d..dce9258 100644
| --- a/mm/slob.c
| +++ b/mm/slob.c
| @@ -538,7 +538,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
|  	struct kmem_cache *c;
|  
|  	c = slob_alloc(sizeof(struct kmem_cache),
| -		flags, ARCH_KMALLOC_MINALIGN, -1);
| +		GFP_KERNEL, ARCH_KMALLOC_MINALIGN, -1);
|  
|  	if (c) {
|  		c->name = name;
|

Hi Catalin,

this would make the following line in slob_alloc

	...
	if (unlikely((gfp & __GFP_ZERO) && b))
		memset(b, 0, size);
 	...

useless. Not sure if it will be good :)

---
Some  CC: added

		- Cyrill -

  reply	other threads:[~2008-12-10 19:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-10 17:36 [PATCH] Do not pass the SLAB flags as GFP in slob kmem_cache_create Catalin Marinas
2008-12-10 19:34 ` Cyrill Gorcunov [this message]
2008-12-10 19:57   ` Matt Mackall
2008-12-10 20:06     ` Cyrill Gorcunov
2008-12-10 20:11   ` Christoph Lameter
2008-12-10 20:23     ` Cyrill Gorcunov
2008-12-10 19:58 ` Matt Mackall
2008-12-11  9:31 ` Pekka Enberg

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=20081210193421.GA2215@localhost \
    --to=gorcunov@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=cl@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=penberg@cs.helsinki.fi \
    /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