]> www.infradead.org Git - users/dwmw2/linux.git/commit
rcu/kvfree: Add kvfree_rcu_barrier() API
authorUladzislau Rezki (Sony) <urezki@gmail.com>
Tue, 20 Aug 2024 15:59:35 +0000 (17:59 +0200)
committerVlastimil Babka <vbabka@suse.cz>
Tue, 27 Aug 2024 12:12:51 +0000 (14:12 +0200)
commit2b55d6a42d14c8675e38d6d9adca3014fdf01951
tree88310577791e5126520e9437cf8f80af304cf42b
parent2eb14c1c2717396f2fb1e4a4c5a1ec87cdd174f6
rcu/kvfree: Add kvfree_rcu_barrier() API

Add a kvfree_rcu_barrier() function. It waits until all
in-flight pointers are freed over RCU machinery. It does
not wait any GP completion and it is within its right to
return immediately if there are no outstanding pointers.

This function is useful when there is a need to guarantee
that a memory is fully freed before destroying memory caches.
For example, during unloading a kernel module.

Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
include/linux/rcutiny.h
include/linux/rcutree.h
kernel/rcu/tree.c