[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180222235532.GA11181@linux.vnet.ibm.com>
Date: Thu, 22 Feb 2018 15:55:32 -0800
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: Jesper Dangaard Brouer <brouer@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
Kirill Tkhai <ktkhai@...tuozzo.com>, josh@...htriplett.org,
mathieu.desnoyers@...icios.com, jiangshanlai@...il.com,
mingo@...hat.com, cl@...ux.com, penberg@...nel.org,
rientjes@...gle.com, iamjoonsoo.kim@....com,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, rao.shoaib@...cle.com
Subject: Re: [PATCH 0/2] rcu: Transform kfree_rcu() into kvfree_rcu()
On Wed, Feb 07, 2018 at 10:10:55AM -0800, Matthew Wilcox wrote:
> On Wed, Feb 07, 2018 at 05:45:13PM +0100, Jesper Dangaard Brouer wrote:
> > On Wed, 7 Feb 2018 08:57:00 -0500
> > Steven Rostedt <rostedt@...dmis.org> wrote:
> > > To me kvfree() is a special case and should not be used by RCU as a
> > > generic function. That would make RCU and MM much more coupled than
> > > necessary.
> >
> > For the record, I fully agree with Steve here.
> >
> > And being a performance "fanatic" I don't like to have the extra branch
> > (and compares) in the free code path... but it's a MM-decision (and
> > sometimes you should not listen to "fanatics" ;-))
>
> While free_rcu() is not withut its performance requirements, I think it's
> currently dominated by cache misses and not by branches. By the time RCU
> gets to run callbacks, memory is certainly L1/L2 cache-cold and probably
> L3 cache-cold. Also calling the callback functions is utterly impossible
> for the branch predictor.
This seems to have fallen by the wayside.
To get things going again, I suggest starting out by simply replacing
the kfree() in __rcu_reclaim() with kvfree(). If desired, a kvfree_rcu()
can also be defined as a synonym for kfree_rcu().
This gets us a very simple and small patch which provides the ability
to dispose of kvmalloc() memory after a grace period.
Thanx, Paul
Powered by blists - more mailing lists