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]
Date:	Thu, 3 Oct 2013 14:15:13 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Davidlohr Bueso <davidlohr@...com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>, aswin@...com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] lockstat: report avg wait and hold times


* Davidlohr Bueso <davidlohr@...com> wrote:

> While both the nr and total times are showed, having the avg lock hold
> and wait times show in the report is quite useful when working on
> performance related issues. Furthermore, I find myself constantly
> doing the calculations manually.
> 
> In addition, some of the documentation examples were changed to easily
> update them to show the two new columns. No textual change otherwise,
> as descriptions match the lockstat output.

Looks useful.

> --- a/kernel/lockdep_proc.c
> +++ b/kernel/lockdep_proc.c
> @@ -421,6 +421,7 @@ static void seq_lock_time(struct seq_file *m, struct lock_time *lt)
>  	seq_time(m, lt->min);
>  	seq_time(m, lt->max);
>  	seq_time(m, lt->total);
> +	seq_time(m, lt->nr ? lt->total/lt->nr : 0);

That won't build on 32-bit systems as lt->total is s64.

You'll need to utilize do_div().

Thanks,

	Ingo
--
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