linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Subject: Re: SLUB: Define functions for cpu slab handling instead of using PageActive
Date: Tue, 15 May 2007 10:07:40 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0705151006520.31624@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20070514215421.d2136057.akpm@linux-foundation.org>

On Mon, 14 May 2007, Andrew Morton wrote:

> On Mon, 14 May 2007 20:00:07 -0700 (PDT) Christoph Lameter <clameter@sgi.com> wrote:
> 
> > Use inline functions to access the per cpu bit. Intoduce the notion of 
> > "freezing" a slab to make things more understandable.
> > 
> > ...
> >
> > +static inline void ClearSlabFrozen(struct page *page)
> > +{
> > +	__ClearPageActive(page);
> > +}
> 
> Non-atomic.
> 
> > -	ClearPageActive(page);
> 
> Atomic.
> 
> A substitution like this can lead to quite revoltingly subtle bugs and needs
> lots of justfication.
> 
> I'll switch this back to the atomic version.  If you're really sure about
> this micro-optimisation then let's do it as a standalone patch.  One which
> adds a comment explaining why it is safe, and under which circumstances it
> will become unsafe, etc.

There is no need for atomics here since the flag is only modified with the 
slab lock taken but there is no __SetPageActive.

--
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-05-15 17:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-15  3:00 Christoph Lameter
2007-05-15  4:54 ` Andrew Morton
2007-05-15 17:07   ` 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=Pine.LNX.4.64.0705151006520.31624@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@linux-foundation.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