[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200731205933.GT23808@casper.infradead.org>
Date: Fri, 31 Jul 2020 21:59:33 +0100
From: Matthew Wilcox <willy@...radead.org>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>, cl@...ux.com,
penberg@...nel.org, rientjes@...gle.com, iamjoonsoo.kim@....com,
hannes@...xchg.org, urezki@...il.com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: Raw spinlocks and memory allocation
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@...nel.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?
Powered by blists - more mailing lists