linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	cl@linux.com, penberg@kernel.org, rientjes@google.com,
	iamjoonsoo.kim@lge.com, hannes@cmpxchg.org, urezki@gmail.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: Raw spinlocks and memory allocation
Date: Fri, 31 Jul 2020 21:59:33 +0100	[thread overview]
Message-ID: <20200731205933.GT23808@casper.infradead.org> (raw)
In-Reply-To: <20200731204855.GR9247@paulmck-ThinkPad-P72>

On Fri, Jul 31, 2020 at 01:48:55PM -0700, Paul E. McKenney wrote:
> On Fri, Jul 31, 2020 at 01:38:34PM -0700, Andrew Morton wrote:
> > On Thu, 30 Jul 2020 16:12:05 -0700 "Paul E. McKenney" <paulmck@kernel.org> wrote:
> > 
> > > So, may we add a GFP_ flag that will cause kmalloc() and friends to return
> > > NULL when they would otherwise need to acquire their non-raw spinlock?
> > > This avoids adding any overhead to the slab-allocator fastpaths, but
> > > allows callback invocation to reduce cache misses without having to
> > > restructure some existing callers of call_rcu() and potential future
> > > callers of kfree_rcu().
> > 
> > We have eight free gfp_t bits so that isn't a problem.
> 
> Whew!!!  ;-)
> 
> > Adding a test-n-branch to the kmalloc() fastpath may well be a concern.
> > 
> > Which of mm/sl?b.c are affected?
> 
> None of them, it turns out.  The initial patch will instead directly
> invoke __get_free_page().  So we could just leave sl?b.c alone.

Isn't that spelled GFP_NOWAIT?


  reply	other threads:[~2020-07-31 20:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30 23:12 Raw spinlocks and memory allocation Paul E. McKenney
2020-07-31 20:38 ` Andrew Morton
2020-07-31 20:48   ` Paul E. McKenney
2020-07-31 20:59     ` Matthew Wilcox [this message]
2020-07-31 21:24       ` Paul E. McKenney
2020-07-31 21:29         ` Andrew Morton
2020-07-31 22:30           ` Paul E. McKenney
2020-07-31 22:47             ` Matthew Wilcox
2020-08-01  0:02               ` Paul E. McKenney

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=20200731205933.GT23808@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=paulmck@kernel.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=urezki@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).