get_state_synchronize_rcu() at boot time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, Uladzislau,

Here is where I placed that probe code and the corresponding output.
Where should I be placing it instead?

						Thanx, Paul

------------------------------------------------------------------------

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 219b4b516f387..308cbc5e68a64 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -4546,8 +4546,17 @@ void rcu_scheduler_starting(void)
 	local_irq_restore(flags);
 
 	// Switch out of early boot mode.
+	pr_err("-> [%d] Invoke synchronize_rcu(): seq number: %lu\n", current->pid, get_state_synchronize_rcu());
+	synchronize_rcu();
+	pr_err("-> [%d] Done. A seq number: %lu\n", current->pid, get_state_synchronize_rcu());
 	rcu_scheduler_active = RCU_SCHEDULER_INIT;
+	pr_err("-> [%d] Invoke synchronize_rcu(): seq number: %lu\n", current->pid, get_state_synchronize_rcu());
+	synchronize_rcu();
+	pr_err("-> [%d] Done. A seq number: %lu\n", current->pid, get_state_synchronize_rcu());
 	rcu_test_sync_prims();
+	pr_err("-> [%d] Invoke synchronize_rcu(): seq number: %lu\n", current->pid, get_state_synchronize_rcu());
+	synchronize_rcu();
+	pr_err("-> [%d] Done. A seq number: %lu\n", current->pid, get_state_synchronize_rcu());
 }
 
 /*
@@ -4817,6 +4826,9 @@ void __init rcu_init(void)
 
 	kfree_rcu_batch_init();
 	rcu_bootup_announce();
+	pr_err("-> [%d] Invoke synchronize_rcu(): seq number: %lu\n", current->pid, get_state_synchronize_rcu());
+	synchronize_rcu();
+	pr_err("-> [%d] Done. A seq number: %lu\n", current->pid, get_state_synchronize_rcu());
 	sanitize_kthread_prio();
 	rcu_init_geometry();
 	rcu_init_one();
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index 7b1e183b0eb23..2993be46f81d5 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -557,9 +557,12 @@ struct early_boot_kfree_rcu {
 static void early_boot_test_call_rcu(void)
 {
 	static struct rcu_head head;
+	int idx;
 	static struct rcu_head shead;
 	struct early_boot_kfree_rcu *rhp;
 
+	idx = srcu_down_read(&early_srcu);
+	srcu_up_read(&early_srcu, idx);
 	call_rcu(&head, test_callback);
 	early_srcu_cookie = start_poll_synchronize_srcu(&early_srcu);
 	call_srcu(&early_srcu, &shead, test_callback);

------------------------------------------------------------------------

[    0.016333] rcu: -> [0] Invoke synchronize_rcu(): seq number: 12
[    0.016334] rcu: -> [0] Done. A seq number: 16
[    0.114209] rcu: -> [0] Invoke synchronize_rcu(): seq number: 32
[    0.114662] rcu: -> [0] Done. A seq number: 36
[    0.115191] rcu: -> [0] Invoke synchronize_rcu(): seq number: 36
[    0.115684] rcu: -> [0] Done. A seq number: 40
[    0.116046] rcu: -> [0] Invoke synchronize_rcu(): seq number: 48
[    0.116202] rcu: -> [0] Done. A seq number: 52



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux