Skip to content

Commit 0f52b4d

Browse files
urezkitehcaster
authored andcommitted
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) <[email protected]> Acked-by: Hyeonggon Yoo <[email protected]> Tested-by: Hyeonggon Yoo <[email protected]> Signed-off-by: Vlastimil Babka <[email protected]>
1 parent b7ffecb commit 0f52b4d

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

include/linux/rcupdate.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ static inline void call_rcu_hurry(struct rcu_head *head, rcu_callback_t func)
118118

119119
/* Internal to kernel */
120120
void rcu_init(void);
121+
void __init kvfree_rcu_init(void);
121122
extern int rcu_scheduler_active;
122123
void rcu_sched_clock_irq(int user);
123124

init/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,7 @@ void start_kernel(void)
992992
workqueue_init_early();
993993

994994
rcu_init();
995+
kvfree_rcu_init();
995996

996997
/* Trace events are available after this */
997998
trace_init();

kernel/rcu/tree.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5648,7 +5648,7 @@ static void __init rcu_dump_rcu_node_tree(void)
56485648

56495649
struct workqueue_struct *rcu_gp_wq;
56505650

5651-
static void __init kfree_rcu_batch_init(void)
5651+
void __init kvfree_rcu_init(void)
56525652
{
56535653
int cpu;
56545654
int i, j;
@@ -5703,7 +5703,6 @@ void __init rcu_init(void)
57035703

57045704
rcu_early_boot_tests();
57055705

5706-
kfree_rcu_batch_init();
57075706
rcu_bootup_announce();
57085707
sanitize_kthread_prio();
57095708
rcu_init_geometry();

0 commit comments

Comments
 (0)