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]
Date:	Wed, 24 Sep 2008 10:25:57 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Steven Rostedt <rostedt@...dmis.org>
cc:	Peter Zijlstra <peterz@...radead.org>,
	Martin Bligh <mbligh@...gle.com>, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...e.hu>,
	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



On Wed, 24 Sep 2008, Steven Rostedt wrote:
> 
> The event counter is just the timestamp (quick patch, simple to fix). The 
> term "counter" was bad. It should have been timestamp, which one would 
> want a 64bit timestamp.

One definitely would _not_ want the full 64-bit timestamp.

There are two cases:

 - lots and lots of events

   just do a 32 bit "timestamp delta" to the previous packet (where the 
   first packet in the queue would be a delta from a value in the queue 
   header - and we can obviously make that value be the TSC so that the 
   first delta is always zero, but it may also make sense to make it a 
   real delta, and the queue header would contain some good 
   synchronization point value).

 - occasional events

   Oops. The delta wouldn't fit. So create a new "timestamp update" packet 
   with a 64-bit thing when doing the reservation. There's obviously no 
   cost issue (since this would only happen for things where there was a 
   multi-second delay - or at least an appreciable fraction of a delay - 
   between events)

This definitely is worth doing. If we have small trace objects (and many 
things really do have pretty small traces), using just a 32-bit TSC not 
only saves 4 bytes per trace event, but it makes it quite reasonable to 
keep the trace data 4-byte-aligned rather than requiring 8-byte alignment.

Of course, if the traces end up being horribly bloated, none of that will 
matter. But I really would hope that you we keep the header itself to just 
8 bytes (and being 2 4-byte entities), so that small payloads are 
reasonable. And that looks doable, if you have a 16-bit "type" and a 
16-bit "size" field.

One thing I'd like to do is to also architecturally reserve a few of the 
types for internal queue management stuff. Things like "padding" objects 
(or a "end-of-ringbuffer" object), and the TSC overflow object, and a 
"time sync" object (or heartbeat). So maybe the type would have the high 
bit set as a "reserved for internal ringbuffer use" or whatever.

			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