linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Mathieu Desnoyers <compudj@krystal.dyndns.org>,
	Pekka Paalanen <pq@iki.fi>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Martin Bligh <mbligh@google.com>
Subject: [PATCH 0/2] ring_buffer: updates for linux-tip
Date: Wed, 01 Oct 2008 00:29:51 -0400	[thread overview]
Message-ID: <20081001042951.412019606@goodmis.org> (raw)

The first patch is just a lockdep clean up of the ring buffer.

The next patch is a new locking design. It is not lockless (yet) but
the locking is a bit cleaner than the original. The basic idea is
that the reader now has its own page to read from that is not in
the ring buffer. When the reader (a consumer) finishes a page, it
then grabs a lock to pull out a new page from the ring buffer and
replace it with the one that it just finished reading.

The writer only locks when it needs to go to the next page. We still
disable interrupts, but it would not be too hard to allow
interrupts to take place on writes. But I will leave that for
version 2 (or 1.2)

The iterator (non consuming read) still expects the tracer to
be disabled when iterating the loop (no locks taken).

The ring_buffer_{un}lock is now no longer around and not needed.

I ran this with lockdep on and it ran fine.

I did lots of testing of trace_pipe (consuming reader) while running
the function trace. The function trace with out a doubt will stress
the consumer/producer reads since the producer is much faster than the
consumer.

Tomorrow, I'll change the buffer_page from being a page_frame to
something that is allocated separately.

-- Steve


             reply	other threads:[~2008-10-01  4:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-01  4:29 Steven Rostedt [this message]
2008-10-01  4:29 ` [PATCH 1/2] ring_buffer: remove raw from local_irq_save Steven Rostedt
2008-10-01  5:52   ` Ingo Molnar
2008-10-01  6:08     ` Ingo Molnar
2008-10-01  6:14       ` Ingo Molnar
2008-10-01  4:29 ` [PATCH 2/2] ring_buffer: implement new locking Steven Rostedt
2008-10-01  6:01   ` Ingo Molnar
2008-10-01  7:20 ` [PATCH 0/2] ring_buffer: updates for linux-tip Frédéric Weisbecker
2008-10-01  7:23   ` Ingo Molnar
2008-10-01 12:32     ` Frédéric Weisbecker
2008-10-01 17:08       ` Frédéric Weisbecker
2008-10-01 17:14     ` [PATCH] ftrace: preempt disable over interrupt disable Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081001042951.412019606@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=compudj@krystal.dyndns.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@google.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=pq@iki.fi \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).