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.DEB.1.10.0809261435540.21618@gandalf.stny.rr.com>
Date:	Fri, 26 Sep 2008 14:39:55 -0400 (EDT)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Richard Holden <aciddeath@...il.com>
cc:	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	prasad@...ux.vnet.ibm.com,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Mathieu Desnoyers <compudj@...stal.dyndns.org>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	David Wilder <dwilder@...ibm.com>, hch@....de,
	Martin Bligh <mbligh@...gle.com>,
	Christoph Hellwig <hch@...radead.org>,
	Masami Hiramatsu <mhiramat@...hat.com>,
	Steven Rostedt <srostedt@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: Re: [PATCH v6] Unified trace buffer


On Fri, 26 Sep 2008, Richard Holden wrote:

> On 9/26/08 12:05 PM, "Steven Rostedt" <rostedt@...dmis.org> wrote:
> 
> > ring_buffer_alloc: create a new ring buffer. Can choose between
> > overwrite or consumer/producer mode. Overwrite will
> > overwrite old data, where as consumer producer will
> > throw away new data if the consumer catches up with the
> > producer.  The consumer/producer is the default.
> 
> Forgive me if I've gotten this wrong but the terminology seems backwards
> Here, I would think we only throw away new data if the producer catches up
> with the consumer, if the consumer catches up with the producer we're
> reading data as fast as it's being written.

Argh! Yes.  I'm the one that is backwards ;-)

Yeah, that is what I meant. Don't you know? You are suppose to understand 
what I mean, not what I say :)

> 
> > 
> > ring_buffer_write: writes some data into the ring buffer.
> > 
> > ring_buffer_peek: Look at a next item in the cpu buffer.
> > ring_buffer_consume: get the next item in the cpu buffer and
> > consume it. That is, this function increments the head
> > pointer.
> 
> Here too, I would think that consuming data would modify the tail pointer.

I always get confused with the translation of what the head/tail to 
producer/consumer.

Here I have the producer adding to the tail, and the consumer reading from
the head. Perhaps this is backwards? I could change it.

s/head/foobar/g
s/tail/head/g
s/foobar/tail/g

That could do it.


> > 
> > Signed-off-by: Steven Rostedt <srostedt@...hat.com>
> 
> Just trying to understand the terminology before I look at the code so I'm
> sorry if I have just completely misunderstood.

Sure, thanks.

-- Steve

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