diff options
author | Vlastimil Babka <vbabka@suse.cz> | 2025-02-03 12:28:47 +0300 |
---|---|---|
committer | Vlastimil Babka <vbabka@suse.cz> | 2025-02-05 12:45:12 +0300 |
commit | b14ff274e8aa5517ff86c94d682bf26bf8b5dcc8 (patch) | |
tree | ebe7e7708fb4bc3ad7484eade19ee78b44f7f0ce /include/linux/slab.h | |
parent | 2014c95afecee3e76ca4a56956a936e23283f05b (diff) | |
download | linux-b14ff274e8aa5517ff86c94d682bf26bf8b5dcc8.tar.xz |
slab, rcu: move TINY_RCU variant of kvfree_rcu() to SLAB
Following the move of TREE_RCU implementation, let's move also the
TINY_RCU one for consistency and subsequent refactoring.
For simplicity, remove the separate inline __kvfree_call_rcu() as
TINY_RCU is not meant for high-performance hardware anyway.
Declare kvfree_call_rcu() in rcupdate.h to avoid header dependency
issues.
Also move the kvfree_rcu_barrier() declaration to slab.h
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Tested-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'include/linux/slab.h')
-rw-r--r-- | include/linux/slab.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h index 09eedaecf120..bcc62e5656c3 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -16,6 +16,7 @@ #include <linux/gfp.h> #include <linux/overflow.h> #include <linux/types.h> +#include <linux/rcupdate.h> #include <linux/workqueue.h> #include <linux/percpu-refcount.h> #include <linux/cleanup.h> @@ -1082,6 +1083,19 @@ extern void kvfree_sensitive(const void *addr, size_t len); unsigned int kmem_cache_size(struct kmem_cache *s); +#ifdef CONFIG_TINY_RCU +static inline void kvfree_rcu_barrier(void) +{ + rcu_barrier(); +} + +static inline void kfree_rcu_scheduler_running(void) { } +#else +void kvfree_rcu_barrier(void); + +void kfree_rcu_scheduler_running(void); +#endif + /** * kmalloc_size_roundup - Report allocation bucket size for the given size * |