rcu/kvfree: Initialize kvfree_rcu() separately

Introduce a separate initialization of kvfree_rcu() functionality.
For such purpose a kfree_rcu_batch_init() is renamed to a kvfree_rcu_init()
and it is invoked from the main.c right after rcu_init() is done.

Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
This commit is contained in:
Uladzislau Rezki (Sony) 2024-12-12 19:02:04 +01:00 committed by Vlastimil Babka
parent b7ffecbe19
commit fbd24a4e50
3 changed files with 3 additions and 2 deletions

View File

@ -118,6 +118,7 @@ static inline void call_rcu_hurry(struct rcu_head *head, rcu_callback_t func)
/* Internal to kernel */
void rcu_init(void);
void __init kvfree_rcu_init(void);
extern int rcu_scheduler_active;
void rcu_sched_clock_irq(int user);

View File

@ -992,6 +992,7 @@ void start_kernel(void)
workqueue_init_early();
rcu_init();
kvfree_rcu_init();
/* Trace events are available after this */
trace_init();

View File

@ -5648,7 +5648,7 @@ static void __init rcu_dump_rcu_node_tree(void)
struct workqueue_struct *rcu_gp_wq;
static void __init kfree_rcu_batch_init(void)
void __init kvfree_rcu_init(void)
{
int cpu;
int i, j;
@ -5703,7 +5703,6 @@ void __init rcu_init(void)
rcu_early_boot_tests();
kfree_rcu_batch_init();
rcu_bootup_announce();
sanitize_kthread_prio();
rcu_init_geometry();