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: <20070601181938.GA30526@elte.hu>
Date:	Fri, 1 Jun 2007 20:19:39 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Daniel Walker <dwalker@...sta.com>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Steven Rostedt <rostedt@...dmis.org>,
	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jason Baron <jbaron@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 3/5] lockstat: core infrastructure


* Daniel Walker <dwalker@...sta.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.

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)

sched_clock() is a 'fast but occasionally inaccurate clock', while the 
GTOD clocksource is an accurate clock (but very often slow).

	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