From: Jiaying Zhang <jiayingz@google.com>
To: rostedt@goodmis.org
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 18:14:57 -0700 [thread overview]
Message-ID: <p2t5df78e1d1003311814q1f270e41o4ebdc1f48659c034@mail.gmail.com> (raw)
In-Reply-To: <1270081707.19685.8095.camel@gandalf.stny.rr.com>
On Wed, Mar 31, 2010 at 5:28 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Tue, 2010-03-30 at 21:01 -0700, Jiaying Zhang wrote:
>
>> I am going to patch rb_get_reader_page() to print out some debugging
>> message when it enters into an infinitely loop. I will keep you updated
>> if I find any interesting info.
>
> I was just thinking about this some more. One restriction to the
> ring_buffer is that a reader can not preempt a writer, which means that
> a read can not happen in an interrupt or NMI. If a read happens there
> and preempts a writer as the writer was moving the head page, it will go
> into an infinite loop waiting for the writer to finish its move.
>
> You can only do reads from interrupt context if the writer disables
> interrupts before reserving and committing the data.
>
> 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?
Jiaying
> -- Steve
>
>
>
next prev parent reply other threads:[~2010-04-01 1:15 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 [this message]
2010-04-01 1:23 ` Steven Rostedt
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=p2t5df78e1d1003311814q1f270e41o4ebdc1f48659c034@mail.gmail.com \
--to=jiayingz@google.com \
--cc=dhsharp@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mrubin@google.com \
--cc=rostedt@goodmis.org \
--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