Thread (36 messages) 36 messages, 12 authors, 2024-11-17

Re: [PATCH 06/17] batman-adv: replace call_rcu by kfree_rcu for simple kmem_cache_free callback

From: Vlastimil Babka <hidden>
Date: 2024-10-14 07:19:59
Also in: batman, kernel-janitors, lkml

On 10/14/24 09:08, Julia Lawall wrote:

On Mon, 14 Oct 2024, Sven Eckelmann wrote:
quoted
On Sunday, 13 October 2024 22:16:53 CEST Julia Lawall wrote:
quoted
Since SLOB was removed and since
commit 6c6c47b063b5 ("mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()"),
it is not necessary to use call_rcu when the callback only performs
kmem_cache_free. Use kfree_rcu() directly.

The changes were made using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 net/batman-adv/translation-table.c |   47 ++-----------------------------------
 1 file changed, 3 insertions(+), 44 deletions(-)

This was tried and we noticed that it is not safe [1]. So, I would get
confirmation that commit 6c6c47b063b5 ("mm, slab: call kvfree_rcu_barrier()
from kmem_cache_destroy()") is fixing the problem which we had at that time.
The commit message sounds like it but I just want to be sure.
Thanks for the feedback. I think that Vlastimil Babka can help with that.
Hi, yeah the batman-adv issue was how we learned about the problem and the
series of commits leading to and including 6c6c47b063b5 was done exactly to
address the kmem_cache_destroy() on module unload issue, and unblock the
conversion to kfree_rcu().

Thanks, Vlastimil
julia
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help