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: <20080925174206.GE29392@Krystal>
Date:	Thu, 25 Sep 2008 13:42:06 -0400
From:	Mathieu Desnoyers <compudj@...stal.dyndns.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Martin Bligh <mbligh@...gle.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	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, "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

* Linus Torvalds (torvalds@...ux-foundation.org) wrote:
> 
> 
> On Thu, 25 Sep 2008, Mathieu Desnoyers wrote:
> > 
> > We could use a page header instead to contain the "unused_size"
> > information.
> 
> Absolutely. There's no one way to do this.
> 
> > I would prefer to put the extended timestamp within the event header
> > instead of creating a separate entry for this for atomicity concerns
> > (what happens if a long interrupt executes between the TSCExtend marker
> > event and the event expecting to be written right next to it ?).
> 
> The log entries should be reserved with interrupts disabled anyway, and 
> they are per-CPU, so there are no atomicity issues.
> 

I actually do use a lockless algorithm in LTTng and don't have to
disable interrupts around tracing. This is how I get the kind of
performance the Google folks expect. I would recommend to stay with
interrupt disable + per-cpu spinlock (slow and heavy locking) for v1,
but to keep in mind that we might want to go for a more lightweight
locking scheme in v2.

> For NMI's, things get more exciting. I'd really prefer NMI's to go to a 
> separate ring buffer entirely, because otherwise consistency gets really 
> hard. Using lockless algorithms for a variable-sized pool of pages is a 
> disaster waiting to happen.
> 

LTTng does it, no disaster happened in the past 2-3 years. :)

I guess we could manage to deal with NMI tracing specfically using the
in_nmi() helpers.

> I don't think we can currently necessarily reasonably trace NMI's, but 
> it's something to keep in mind as required support eventually.
> 

NMI tracing is a nice-to-have (and lttng does provide it), but the core
thing is really performance; disabling interrupts happens to be fairly
slow on many architectures.

Mathieu

> 		Linus
> 

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
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