public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Davidlohr Bueso <davidlohr@hp.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	aswin@hp.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lockstat: report avg wait and hold times
Date: Thu, 3 Oct 2013 14:15:13 +0200	[thread overview]
Message-ID: <20131003121513.GA6760@gmail.com> (raw)
In-Reply-To: <1380746928.2313.14.camel@buesod1.americas.hpqcorp.net>


* Davidlohr Bueso <davidlohr@hp.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

  reply	other threads:[~2013-10-03 12:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-02 20:48 [PATCH] lockstat: report avg wait and hold times Davidlohr Bueso
2013-10-03 12:15 ` Ingo Molnar [this message]
2013-10-09  3:37   ` Davidlohr Bueso
2013-10-03 12:16 ` Ingo Molnar
2013-10-09 17:24 ` [tip:core/locking] lockstat: Report " tip-bot for Davidlohr Bueso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131003121513.GA6760@gmail.com \
    --to=mingo@kernel.org \
    --cc=aswin@hp.com \
    --cc=davidlohr@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox