mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm] slub: update cpu after new_slab()
Date: Wed, 25 Apr 2007 17:13:25 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0704251703360.24086@blonde.wat.veritas.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0704250857170.24530@schroedinger.engr.sgi.com>

On Wed, 25 Apr 2007, Christoph Lameter wrote:
> On Wed, 25 Apr 2007, Hugh Dickins wrote:
> 
> > > Right. local_irq_save does not switch off preemption as I thought.
> > 
> > Strange comment.  Preemption is not possible while IRQs are disabled,
> > but new_slab() rightly reenables them within itself in the __GFP_WAIT
> > case, since it's going off to do a page allocation and may need to wait.
> 
> Yes I expected local_irq_save to increase the preempt count and then 
> local_irq_enable to simply enable interrupts without affecting the preempt 
> count. Thus the process should stay on the same processor.
> 
> Never thought it would be possible to move to a different processor in mid 
> flight.

But, surely you wouldn't have expected it to stay on the processor
throughout the waiting page allocation??  I think you're misremembering
your expectations, and this was just a simple, understandable, oversight.

Quite a serious one, though: it got caught in my case by the NULL
dereference, but it's probably been switching cpu there much more
often - one cpu diddling with what's private to another, with
unpredictable results.

Hugh

  reply	other threads:[~2007-04-25 16:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-25 15:21 Hugh Dickins
2007-04-25 15:29 ` Christoph Lameter
2007-04-25 15:49   ` Hugh Dickins
2007-04-25 15:58     ` Christoph Lameter
2007-04-25 16:13       ` Hugh Dickins [this message]
2007-04-25 16:21         ` Christoph Lameter

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.0704251703360.24086@blonde.wat.veritas.com \
    --to=hugh@veritas.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®