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: <alpine.LFD.2.00.0810201256350.3518@nehalem.linux-foundation.org>
Date:	Mon, 20 Oct 2008 13:10:02 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
cc:	"Luck, Tony" <tony.luck@...el.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Thomas Gleixner <tglx@...utronix.de>,
	David Miller <davem@...emloft.net>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [RFC patch 15/15] LTTng timestamp x86



On Fri, 17 Oct 2008, Mathieu Desnoyers wrote:
> 
> Hrm, on such systems
> - *large* amount of cpus
> - no synchronized TSCs
> 
> What would be the best approach to order events ?

My strong opinion has been - for a longish while now, and independently of 
any timestamping code - that we should be seriously looking at basically 
doing essentially a "ntp" inside the kernel to give up the whole idiotic 
notion of "synchronized TSCs". Yes, TSC's are often synchronized, but even 
when they are, we might as well _think_ of them as not being so.

In other words, instead of expecting internal clocks to be synchronized, 
just make the clock be a clock network of independent TSC domains. The 
domains could in theory be per-package (assuming TSC is synchronized at 
that level), but even if we _could_ do that, we'd probably still be better 
off by simply always doing it per-core. If only because then the reading 
would be per-core.

I think it's a mistake for us to maintain a single clock for 
gettimeofday() (well, "getnstimeofday" and the whole "clocksource_read()" 
crud to be technically correct). And sure, I bet clocksource_read() can do 
various per-CPU things and try to do that, but it's complex and pretty 
generic code, and as far as I know none of the clocksources have even 
tried. The TSC clocksource read certainly does not (it just does a very 
similar horrible "at least don't go backwards" crud that the LTTng patch 
suggested).

So I think we should make "xtime" be a per-CPU thing, and add support for 
per-CPU clocksources. And screw that insane "mark_tsc_unstable()" thing.

And if we did it well, we migth be able to get good timestamps that way 
too.

		Linus
--
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