]> git.karo-electronics.de Git - linux-beck.git/commitdiff
rcu: Create directory for each flavor of rcu
authorMichael Wang <wangyun@linux.vnet.ibm.com>
Thu, 20 Sep 2012 00:51:02 +0000 (08:51 +0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 8 Nov 2012 19:50:14 +0000 (11:50 -0800)
This patch will create subdirectory according to each flavor of rcu, the new
structure will be:

/debugfs/rcu/ -> rsp_0
      -> rsp_1
      -> ...

So we can go to '/debugfs/rcu/rsp_0' and get the cpu info of rsp_0 there.
The flavors of RCU are currently rcu_bh, rcu_preempt, and rcu_sched.

Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcutree_trace.c

index 693513bc50e6d00921bff73ed4eb03f852ceec43..62223a27f985e0b11eaba29ff10571adc09d3945 100644 (file)
@@ -446,12 +446,20 @@ static struct dentry *rcudir;
 
 static int __init rcutree_trace_init(void)
 {
+       struct rcu_state *rsp;
        struct dentry *retval;
+       struct dentry *rspdir;
 
        rcudir = debugfs_create_dir("rcu", NULL);
        if (!rcudir)
                goto free_out;
 
+       for_each_rcu_flavor(rsp) {
+               rspdir = debugfs_create_dir(rsp->name, rcudir);
+               if (!rspdir)
+                       goto free_out;
+       }
+
        retval = debugfs_create_file("rcubarrier", 0444, rcudir,
                                                NULL, &rcubarrier_fops);
        if (!retval)