linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Matt Mackall <mpm@selenic.com>
Subject: Re: [git pull] slub fallback fix
Date: Tue, 18 Mar 2008 10:42:32 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0803181037470.21992@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <alpine.LFD.1.00.0803180737350.3020@woody.linux-foundation.org>

On Tue, 18 Mar 2008, Linus Torvalds wrote:

> > We need to reenable interrupts before calling the page allocator from the
> > fallback path for kmalloc. Used to be okay with the alternate fastpath 
> > which shifted interrupt enable/disable to the fastpath. But the slowpath
> > is always called with interrupts disabled now. So we need this fix.
> 
> I think this fix is bogus and inefficient.
> 
> The proper fix would seem to be to just not disable the irq's 
> unnecessarily!
> 
> We don't care what the return state of the interrupts are, since the 
> caller will restore the _true_ interrupt state (which we don't even know 
> about, so we can't do it). 
> 
> So why isn't the patch just doing something like the appended instead of 
> disabling and enabling interrupts unnecessarily?

Fallback is rare and I'd like to have the fallback logic in one place. It 
would also mean that the interrupt state on return to slab_alloc() would 
be indeterminate. Currently that works but it may be surprising in the 
future when changes are made there.

--
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:[~2008-03-18 17:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-17 18:43 Christoph Lameter
2008-03-18 14:42 ` Linus Torvalds
2008-03-18 17:42   ` Christoph Lameter [this message]
2008-03-18 18:25     ` Linus Torvalds
2008-03-18 18:45       ` Christoph Lameter
2008-03-19  4:13         ` Linus Torvalds

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.0803181037470.21992@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mpm@selenic.com \
    --cc=penberg@cs.helsinki.fi \
    --cc=torvalds@linux-foundation.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