Re: [PATCH 0/2] rcu: Transform kfree_rcu() into kvfree_rcu()

From: Steven Rostedt
Date: Wed Feb 07 2018 - 11:34:23 EST


On Wed, 7 Feb 2018 08:18:46 -0800
Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:

> Do we need to be able to free any of those objects in order to rename
> kfree_rcu() to just free_rcu()?

I'm just nervous about tightly coupling free_rcu() with all the *free()
from the memory management system. I've been burnt in the past by doing
such things.

What's the down side of having a way of matching *free_rcu() with all
the *free()s? I think it's easier to understand, and rcu doesn't need
to worry about changes of *free() code.

To me:

kfree_rcu(x);

is just a quick way of doing 'kfree(x)' after a synchronize_rcu() call.

But a "free_rcu(x)", is something I have to think about, because I
don't know from the name exactly what it is doing.

I know this may sound a bit bike shedding, but the less I need to think
about how other sub systems work, the easier it is to concentrate on my
own sub system.

-- Steve