diff options
| author | Ingo Molnar <mingo@kernel.org> | 2016-01-06 11:41:48 +0100 | 
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2016-01-06 11:41:48 +0100 | 
| commit | 3104fb3dd45bb47ff1382d1c079c251710ddcae3 (patch) | |
| tree | 0c562ad5b3a960b3299edd5abdbe12b9f0a50a6b /kernel/rcu/tree_trace.c | |
| parent | ee9a7d2cb0cf1a1498478bc923d911f3d9c910ac (diff) | |
| parent | 984cf355aeaa8f2eda3861b50d0e8d3e3f77e83b (diff) | |
Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
Pull RCU changes from Paul E. McKenney:
 - Adding transitivity uniformly to rcu_node structure ->lock
   acquisitions.  (This is implemented by the first two commits
   on top of v4.4-rc2 due to the pervasive nature of this change.)
 - Documentation updates, including RCU requirements.
 - Expedited grace-period changes.
 - Miscellaneous fixes.
 - Linked-list fixes, courtesy of KTSAN.
 - Torture-test updates.
 - Late-breaking fix to sysrq-generated crash.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/rcu/tree_trace.c')
| -rw-r--r-- | kernel/rcu/tree_trace.c | 37 | 
1 files changed, 15 insertions, 22 deletions
diff --git a/kernel/rcu/tree_trace.c b/kernel/rcu/tree_trace.c index ef7093cc9b5c..1088e64f01ad 100644 --- a/kernel/rcu/tree_trace.c +++ b/kernel/rcu/tree_trace.c @@ -1,5 +1,5 @@  /* - * Read-Copy Update tracing for classic implementation + * Read-Copy Update tracing for hierarchical implementation.   *   * This program is free software; you can redistribute it and/or modify   * it under the terms of the GNU General Public License as published by @@ -16,6 +16,7 @@   * http://www.gnu.org/licenses/gpl-2.0.html.   *   * Copyright IBM Corporation, 2008 + * Author: Paul E. McKenney   *   * Papers:  http://www.rdrop.com/users/paulmck/RCU   * @@ -33,9 +34,7 @@  #include <linux/sched.h>  #include <linux/atomic.h>  #include <linux/bitops.h> -#include <linux/module.h>  #include <linux/completion.h> -#include <linux/moduleparam.h>  #include <linux/percpu.h>  #include <linux/notifier.h>  #include <linux/cpu.h> @@ -183,14 +182,20 @@ static const struct file_operations rcudata_fops = {  static int show_rcuexp(struct seq_file *m, void *v)  { +	int cpu;  	struct rcu_state *rsp = (struct rcu_state *)m->private; +	struct rcu_data *rdp; +	unsigned long s0 = 0, s1 = 0, s2 = 0, s3 = 0; +	for_each_possible_cpu(cpu) { +		rdp = per_cpu_ptr(rsp->rda, cpu); +		s0 += atomic_long_read(&rdp->expedited_workdone0); +		s1 += atomic_long_read(&rdp->expedited_workdone1); +		s2 += atomic_long_read(&rdp->expedited_workdone2); +		s3 += atomic_long_read(&rdp->expedited_workdone3); +	}  	seq_printf(m, "s=%lu wd0=%lu wd1=%lu wd2=%lu wd3=%lu n=%lu enq=%d sc=%lu\n", -		   rsp->expedited_sequence, -		   atomic_long_read(&rsp->expedited_workdone0), -		   atomic_long_read(&rsp->expedited_workdone1), -		   atomic_long_read(&rsp->expedited_workdone2), -		   atomic_long_read(&rsp->expedited_workdone3), +		   rsp->expedited_sequence, s0, s1, s2, s3,  		   atomic_long_read(&rsp->expedited_normal),  		   atomic_read(&rsp->expedited_need_qs),  		   rsp->expedited_sequence / 2); @@ -319,7 +324,7 @@ static void show_one_rcugp(struct seq_file *m, struct rcu_state *rsp)  	unsigned long gpmax;  	struct rcu_node *rnp = &rsp->node[0]; -	raw_spin_lock_irqsave(&rnp->lock, flags); +	raw_spin_lock_irqsave_rcu_node(rnp, flags);  	completed = READ_ONCE(rsp->completed);  	gpnum = READ_ONCE(rsp->gpnum);  	if (completed == gpnum) @@ -487,16 +492,4 @@ free_out:  	debugfs_remove_recursive(rcudir);  	return 1;  } - -static void __exit rcutree_trace_cleanup(void) -{ -	debugfs_remove_recursive(rcudir); -} - - -module_init(rcutree_trace_init); -module_exit(rcutree_trace_cleanup); - -MODULE_AUTHOR("Paul E. McKenney"); -MODULE_DESCRIPTION("Read-Copy Update tracing for hierarchical implementation"); -MODULE_LICENSE("GPL"); +device_initcall(rcutree_trace_init);  | 
