From: Steven Rostedt <rostedt@goodmis.org>
To: Jiaying Zhang <jiayingz@google.com>
Cc: Steven Rostedt <srostedt@redhat.com>, Ingo Molnar <mingo@elte.hu>,
Michael Rubin <mrubin@google.com>,
David Sharp <dhsharp@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: lockup in rb_get_reader_page
Date: Wed, 31 Mar 2010 21:23:02 -0400 [thread overview]
Message-ID: <1270084982.19685.8151.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <p2t5df78e1d1003311814q1f270e41o4ebdc1f48659c034@mail.gmail.com>
On Wed, 2010-03-31 at 18:14 -0700, Jiaying Zhang wrote:
> On Wed, Mar 31, 2010 at 5:28 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> > Are you doing reads from interrupt context?
> >
> No. We are using a user-space reader that reads ring buffer via syscall
> or ioctl. But even though we don't read from interrupt context, as I
> understand, we can still have a reader on another cpuB reads cpuA's
> buffer when the writer on cpuA moves the head page. Will we have
> any problem in that case?
Nope, unless that write hangs for some reason ;-)
The read may spin waiting for a writer to finish, hence it just can not
preempt a writer in an interrupt context, because then it may spin
forever, because it is blocking the writer. But if a writer is on
another CPU, then all is well. In fact, the ring buffer was designed
with that in mind.
-- Steve
next prev parent reply other threads:[~2010-04-01 1:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-30 23:27 lockup in rb_get_reader_page Jiaying Zhang
2010-03-31 0:35 ` Steven Rostedt
2010-03-31 4:01 ` Jiaying Zhang
2010-04-01 0:28 ` Steven Rostedt
2010-04-01 1:14 ` Jiaying Zhang
2010-04-01 1:23 ` Steven Rostedt [this message]
2010-04-02 23:10 ` Jiaying Zhang
2010-04-03 12:45 ` Steven Rostedt
2010-04-06 21:12 ` Jiaying Zhang
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=1270084982.19685.8151.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=dhsharp@google.com \
--cc=jiayingz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mrubin@google.com \
--cc=srostedt@redhat.com \
/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