]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
srcu: Make Classic and Tree SRCU announce themselves at bootup
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 21 Apr 2017 18:16:32 +0000 (11:16 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 8 Jun 2017 15:25:30 +0000 (08:25 -0700)
Currently, the only way to tell whether a given kernel is running
Classic, Tiny, or Tree SRCU is to look at the .config file, which
can easily be lost or associated with the wrong kernel.  This commit
therefore has Classic and Tree SRCU identify themselves at boot time.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/srcu.c
kernel/rcu/srcutree.c

index dea03614263fdc185fbdb3a7e3ec9ec8d1618888..4e3f558409a027aa2a9094815f6edbbf6eb6549d 100644 (file)
@@ -659,3 +659,10 @@ void process_srcu(struct work_struct *work)
        srcu_reschedule(sp);
 }
 EXPORT_SYMBOL_GPL(process_srcu);
+
+static int __init srcu_bootup_announce(void)
+{
+       pr_info("Classic SRCU implementation.\n");
+       return 0;
+}
+early_initcall(srcu_bootup_announce);
index fceca84df6b05c154dfae4d34bfce163a17c4628..03d57fe9f0949be93240e481d1775a3227c60a2c 100644 (file)
@@ -1167,3 +1167,10 @@ void srcutorture_get_gp_data(enum rcutorture_type test_type,
        *gpnum = rcu_seq_ctr(sp->srcu_gp_seq_needed);
 }
 EXPORT_SYMBOL_GPL(srcutorture_get_gp_data);
+
+static int __init srcu_bootup_announce(void)
+{
+       pr_info("Hierarchical SRCU implementation.\n");
+       return 0;
+}
+early_initcall(srcu_bootup_announce);