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:36 -0700 [thread overview]
Message-ID: <1180726236.15884.102.camel@imap.mvista.com> (raw)
In-Reply-To: <20070601181938.GA30526@elte.hu>
On Fri, 2007-06-01 at 20:19 +0200, Ingo Molnar wrote:
> * Daniel Walker <dwalker@mvista.com> wrote:
>
> > > > > I see sched_clock() as fast first, accurate second. Whereas the
> > > > > clocksource thing is accurate first, fast second.
> > > >
> > > > This is true .. However, if there is a speed different it's small.
> > >
> > > Ugh. Have you ever compared pmtimer (or even hpet) against TSC based
> > > sched_clock()? What you write is so wrong that it's not even funny.
> > > You keep repeating this nonsense despite having been told multiple
> > > times that you are dead wrong.
> >
> > Yes I have, and your right there is a difference, and a big difference
> > .. Above I was referring only to the TSC clocksource, since that's an
> > apples to apples comparison .. I would never compare the TSC to the
> > acpi_pm, that's no contest ..
>
> You still dont get it i think: in real life we end up using the TSC in
> sched_clock() _much more often_ than we end up using the TSC for
> clocksource! So your flawed suggestion does not fix anything, it in fact
> introduces a really bad regression: instead of using the TSC (or
> jiffies) we'd end up using the pmtimer or hpet for every lock operation
> when lockstat is enabled, bringing the box to a screeching halt in
> essence.
My position isn't that we should use the high level clocksource
interface as it is now without changes .. That's never been my position
since I've been working with it.. The high level interface will need to
evolve.
I'm saying we should use the clocksource structure as the main hook into
the low level architecture code.
> so what you suggest has a far worse effect on the _majority_ of systems
> that are even interested in running lockstat, than the case you
> mentioned that some seldom-used arch which is lazy about sched_clock()
> falls back to jiffies granularity. It's not a big deal: the stats will
> have the same granularity. (the op counts in lockstat will still be
> quite useful)
My suggestion is only as good as the implementation .. Your making some
fairly sweeping assumption about how lockstat _would_ use the
clocksources in it's final form ..
So clearly lockstat has a contraint which is that it can't use slow
clocks..
> sched_clock() is a 'fast but occasionally inaccurate clock', while the
> GTOD clocksource is an accurate clock (but very often slow).
I think we're just taking different perspectives .. The tsc clocksource
is just as fast as the tsc sched_clock() , you can interchange the two
without ill effects .. That's one perspective ..
You can use a yet to be written API that uses the GTOD and a
clocksource, and allows slow clocksources to be used in place of fast
ones with really bad effects, that's another perspective ..
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
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 [this message]
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=1180726236.15884.102.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®