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: <20080925153635.GA12840@elte.hu>
Date:	Thu, 25 Sep 2008 17:36:35 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Martin Bligh <mbligh@...gle.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Martin Bligh <mbligh@...igh.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	prasad@...ux.vnet.ibm.com,
	Mathieu Desnoyers <compudj@...stal.dyndns.org>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	David Wilder <dwilder@...ibm.com>, hch@....de,
	Tom Zanussi <zanussi@...cast.net>,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: [RFC PATCH 1/3] Unified trace buffer


* Martin Bligh <mbligh@...gle.com> wrote:

> > And I don't think normalizing later is in any way more fundamentally 
> > hard. It just means that you do part of the expensive things after 
> > you have gathered the trace, rather than during.
> 
> Agree with you on doing the expensive stuff later. If we wanted to get 
> something that'd pack down to a couple fewer bits, and approximate ns, 
> we could always >> 1 if you were > 2GHz, and >> 2 if you where > 4GHz, 
> etc. which is at least cheap.

... which is exactly what sched_clock() does, combined with a 
multiplication. (which is about as expensive as normal linear 
arithmetics on most CPUs - i.e. in the 1 cycle range)

Normalizing has the advantage that we dont have to worry about it ever 
again. Not about a changing scale due to cpufreq, slowing down or 
speeding up TSCs due to C2/C3. We have so much TSC breakage all across 
the spectrum that post-processing it is a nightmare in practice. Plus we 
want sched_clock() to be fast anyway.

in the distant future we not only will have constant-TSC but it wont 
stop in C2/C3 either at a whim (which they do right now, messing up 
timestamps). At that stage fast time readout it will be so sane that CPU 
makers should really provide a nanosec readout - it's easy to do a 
simple multiplicator and hide the few cycles multiplicator latency to 
RDTSC (this is continuous time after all so it's easy for the hw).

Hm?

	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