From: Daniel Walker <dwalker@mvista.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Steven Rostedt <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Jason Baron <jbaron@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 3/5] lockstat: core infrastructure
Date: Fri, 01 Jun 2007 12:30:37 -0700 [thread overview]
Message-ID: <1180726237.15884.103.camel@imap.mvista.com> (raw)
In-Reply-To: <20070601183053.GA30072@elte.hu>
On Fri, 2007-06-01 at 20:30 +0200, Ingo Molnar wrote:
> * Daniel Walker <dwalker@mvista.com> wrote:
>
> > > So, having two interfaces, one fast and one accurate is the right
> > > answer IMHO.
> >
> > In the case of lockstat you have two cases fast and functional, and
> > non-functional .. Right now your patch has no slow and functional
> > state.
>
> let me explain it to you:
>
> 1) there is absolutely no problem here to begin with. If a rare
> architecture is lazy enough to not bother implementing a finegrained
> sched_clock() then it certainly does not care about the granularity of
> lockstat fields either. If it does, it can improve scheduling and get
> more finegrained lockstat by implementing a proper sched_clock()
> function - all for the same price! ;-)
There is a problem, which we are discussing ... sched_clock() can be
lowres in lots of different situations, and lockstat fails to account
for that .. That in turn makes it's timing non-functional.
> 2) the 'solution' you suggested for this non-problem is _far worse_ than
> the granularity non-problem, on the _majority_ of server systems today!
> Think about it! Your suggestion would make lockstat _totally unusable_.
> Not "slow and functional" like you claim but "dead-slow and unusable".
I'm not sure how to respond to this.. You taking a big ball of
assumptions, and molding it into what ever you want ..
> in light of all this it is puzzling to me how you can still call Peter's
> code "non-functional" with a straight face. I have just tried lockstat
> with jiffies granular sched_clock() and it was still fully functional.
> So if you want to report some bug then please do it in a proper form.
Clearly you can't have sane microsecond level timestamps with a clock
that doesn't support microsecond resolution.. This is even something
Peter acknowledged in his first email to me.
> > As I said before there is no reason why and architectures should be
> > forced to implement sched_clock() .. Is there some specific reason why
> > you think it should be mandatory?
>
> Easy: it's not mandatory, but it's certainly "nice" even today, even
> without lockstat. It will get you:
>
> - better scheduling
> - better printk timestamps
> - higher-quality blktrace timestamps
>
> With lockstat, append "more finegrained lockstat output" to that list of
> benefits too. That's why every sane server architecture has a
> sched_clock() implementation - go check the kernel source. Now i wouldnt
> mind to clean the API up and call it get_stat_clock() or whatever - but
> that was not your suggestion at all - your suggestion was flawed: to
> implement sched_clock() via the GTOD clocksource.
At this point it's not clear to me you know what my suggestion was ..
Your saying you want a better API for sched_clock(), and yes I agree
with that 100% sched_clock() needs a better API .. The paragraph above
it looks like your on the verge of agreeing with me ..
You think my words are puzzling, try it from this end..
Daniel
next prev parent reply other threads:[~2007-06-01 19:33 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-29 12:52 [PATCH 0/5] lock contention tracking -v3 Peter Zijlstra
2007-05-29 12:52 ` [PATCH 1/5] fix raw_spinlock_t vs lockdep Peter Zijlstra
2007-05-29 12:52 ` [PATCH 2/5] lockdep: sanitise CONFIG_PROVE_LOCKING Peter Zijlstra
2007-05-29 13:21 ` Christoph Hellwig
2007-05-29 14:16 ` Ingo Molnar
2007-05-30 3:14 ` Andrew Morton
2007-05-29 12:52 ` [PATCH 3/5] lockstat: core infrastructure Peter Zijlstra
2007-05-29 20:28 ` Daniel Walker
2007-05-30 13:03 ` Peter Zijlstra
2007-05-30 13:24 ` Ingo Molnar
2007-05-30 13:40 ` Steven Rostedt
2007-05-30 13:49 ` Ingo Molnar
2007-05-30 17:06 ` Daniel Walker
2007-05-30 17:16 ` Peter Zijlstra
2007-05-30 17:25 ` Daniel Walker
2007-06-01 13:12 ` Ingo Molnar
2007-06-01 15:26 ` Daniel Walker
2007-06-01 15:52 ` Peter Zijlstra
2007-06-01 16:11 ` Daniel Walker
2007-06-01 18:30 ` Ingo Molnar
2007-06-01 19:25 ` Matt Mackall
2007-06-01 19:30 ` Daniel Walker [this message]
2007-06-01 18:43 ` Peter Zijlstra
2007-06-01 18:51 ` Ingo Molnar
2007-06-01 19:30 ` Daniel Walker
2007-06-01 18:19 ` Ingo Molnar
2007-06-01 19:30 ` Daniel Walker
2007-06-01 14:25 ` Andi Kleen
2007-05-30 15:20 ` Daniel Walker
2007-05-30 3:43 ` Andrew Morton
2007-05-29 12:52 ` [PATCH 4/5] lockstat: human readability tweaks Peter Zijlstra
2007-05-29 12:52 ` [PATCH 5/5] lockstat: hook into spinlock_t, rwlock_t, rwsem and mutex Peter Zijlstra
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=1180726237.15884.103.camel@imap.mvista.com \
--to=dwalker@mvista.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=jbaron@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®