lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120615233801.GD7613@leaf>
Date:	Fri, 15 Jun 2012 16:38:01 -0700
From:	Josh Triplett <josh@...htriplett.org>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...ymtl.ca, niv@...ibm.com, tglx@...utronix.de,
	peterz@...radead.org, rostedt@...dmis.org, Valdis.Kletnieks@...edu,
	dhowells@...hat.com, eric.dumazet@...il.com, darren@...art.com,
	fweisbec@...il.com, patches@...aro.org,
	"Paul E. McKenney" <paul.mckenney@...aro.org>
Subject: Re: [PATCH tip/core/rcu 11/15] rcu: Add rcu_barrier() statistics to
 debugfs tracing

On Fri, Jun 15, 2012 at 02:06:06PM -0700, Paul E. McKenney wrote:
> From: "Paul E. McKenney" <paul.mckenney@...aro.org>
> 
> This commit adds an rcubarrier file to RCU's debugfs statistical tracing
> directory, providing diagnostic information on rcu_barrier().
> 
> Signed-off-by: Paul E. McKenney <paul.mckenney@...aro.org>
> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>

Reviewed-by: Josh Triplett <josh@...htriplett.org>

>  kernel/rcutree_trace.c |   39 +++++++++++++++++++++++++++++++++++++++
>  1 files changed, 39 insertions(+), 0 deletions(-)
> 
> diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c
> index a3556a2..057408b 100644
> --- a/kernel/rcutree_trace.c
> +++ b/kernel/rcutree_trace.c
> @@ -46,6 +46,40 @@
>  #define RCU_TREE_NONCORE
>  #include "rcutree.h"
>  
> +static void print_rcubarrier(struct seq_file *m, struct rcu_state *rsp)
> +{
> +	seq_printf(m, "%c bcc: %d nbd: %lu\n",
> +		   rsp->rcu_barrier_in_progress ? 'B' : '.',
> +		   atomic_read(&rsp->barrier_cpu_count),
> +		   rsp->n_barrier_done);
> +}
> +
> +static int show_rcubarrier(struct seq_file *m, void *unused)
> +{
> +#ifdef CONFIG_TREE_PREEMPT_RCU
> +	seq_puts(m, "rcu_preempt: ");
> +	print_rcubarrier(m, &rcu_preempt_state);
> +#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
> +	seq_puts(m, "rcu_sched: ");
> +	print_rcubarrier(m, &rcu_sched_state);
> +	seq_puts(m, "rcu_bh: ");
> +	print_rcubarrier(m, &rcu_bh_state);
> +	return 0;
> +}
> +
> +static int rcubarrier_open(struct inode *inode, struct file *file)
> +{
> +	return single_open(file, show_rcubarrier, NULL);
> +}
> +
> +static const struct file_operations rcubarrier_fops = {
> +	.owner = THIS_MODULE,
> +	.open = rcubarrier_open,
> +	.read = seq_read,
> +	.llseek = seq_lseek,
> +	.release = single_release,
> +};
> +
>  #ifdef CONFIG_RCU_BOOST
>  
>  static char convert_kthread_status(unsigned int kthread_status)
> @@ -453,6 +487,11 @@ static int __init rcutree_trace_init(void)
>  	if (!rcudir)
>  		goto free_out;
>  
> +	retval = debugfs_create_file("rcubarrier", 0444, rcudir,
> +						NULL, &rcubarrier_fops);
> +	if (!retval)
> +		goto free_out;
> +
>  	retval = debugfs_create_file("rcudata", 0444, rcudir,
>  						NULL, &rcudata_fops);
>  	if (!retval)
> -- 
> 1.7.8
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ