linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
From: Christoph Lameter <clameter@engr.sgi.com>
To: clameter@engr.sgi.com
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH] SLUB The unqueued slab allocator V3
Date: Wed, 28 Feb 2007 17:48:12 -0800 (PST)	[thread overview]
Date: Wed, 28 Feb 2007 17:06:19 -0800 (PST)	[thread overview]
Message-ID: <20070228.174812.25474757.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0702281656450.1488@schroedinger.engr.sgi.com>

> On Wed, 28 Feb 2007, David Miller wrote:
> 
> > Arguably SLAB_HWCACHE_ALIGN and SLAB_MUST_HWCACHE_ALIGN should
> > not be set here, but SLUBs change in semantics in this area
> > could cause similar grief in other areas, an audit is probably
> > in order.
> > 
> > The above example was from sparc64, but x86 does the same thing
> > as probably do other platforms which use SLAB for pagetables.
> 
> Maybe this will address these concerns?
> 
> Index: linux-2.6.21-rc2/mm/slub.c
> ===================================================================
> --- linux-2.6.21-rc2.orig/mm/slub.c	2007-02-28 16:54:23.000000000 -0800
> +++ linux-2.6.21-rc2/mm/slub.c	2007-02-28 17:03:54.000000000 -0800
> @@ -1229,8 +1229,10 @@ static int calculate_order(int size)
>  static unsigned long calculate_alignment(unsigned long flags,
>  		unsigned long align)
>  {
> -	if (flags & (SLAB_MUST_HWCACHE_ALIGN|SLAB_HWCACHE_ALIGN))
> +	if (flags & SLAB_HWCACHE_ALIGN)
>  		return L1_CACHE_BYTES;
> +	if (flags & SLAB_MUST_HWCACHE_ALIGN)
> +		return max(align, (unsigned long)L1_CACHE_BYTES);
>  
>  	if (align < ARCH_SLAB_MINALIGN)
>  		return ARCH_SLAB_MINALIGN;

It would achiever parity with existing SLAB behavior, sure.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2007-03-01  1:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-28 19:20 Christoph Lameter
2007-02-28 22:00 ` David Miller, Christoph Lameter
2007-02-28 22:17   ` David Miller, David Miller
2007-03-01  1:06   ` Christoph Lameter
2007-03-01  1:48     ` David Miller, Christoph Lameter [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=20070228.174812.25474757.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@engr.sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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