From: John Stultz <john.stultz@linaro.org>
To: Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>,
Arnd Bergmann <arnd@arndb.de>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org, Corey Minyard <cminyard@mvista.com>,
Stanislav Meduna <stano@meduna.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH v2] tracing: Don't account for cpu idle time with irqsoff tracers
Date: Wed, 28 May 2014 10:22:37 -0700 [thread overview]
Message-ID: <53861B5D.2040406@linaro.org> (raw)
In-Reply-To: <20140528072457.GM11096@twins.programming.kicks-ass.net>
On 05/28/2014 12:24 AM, Peter Zijlstra wrote:
> On Tue, May 27, 2014 at 08:42:14PM -0400, Steven Rostedt wrote:
>> On Tue, 2014-05-27 at 17:11 -0700, Stephen Boyd wrote:
>>
>>> cpuidle_enter_state() calls ktime_get() which on lockdep enabled builds
>>> calls seqcount_lockdep_reader_access() which calls local_irq_save() that
>>
>> seqcount_lockdep_reader_access()?? Ug, I wonder if that should call
>> raw_local_irq_save/restore() as it's a lockdep helper to begin with. If
>> it's wrong then it's the lockdep infrastructure that broke, not the core
>> kernel.
>>
>> Peter?
>
> Hurm,.. don't know actually.. so from a lockdep pov it doesn't need to
> do that and we can simply remove the local_irq_{save,restore}() from
> that function.
>
> It could be John did it to avoid some IRQ recursion warning, but if so,
> he failed to mention it.
>
> John, remember why you typed those characters?
So.. With seqlocks, we're trying to just make sure reads and writes
don't nest under a write. However we don't care if a write nests in a
read, because the read will be restarted. An example is someone hitting
gettimeofday over and over taking a read, and then an IRQ lands mid-read
and we take the write and update the data. This is expected normal
behavior. So this was trying to make the read side lockdep
aquire/release combo atomic, so we don't create false warnings if an IRQ
landed right in-between.
Does that make sense?
thanks
-john
next prev parent reply other threads:[~2014-05-28 17:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 20:08 [PATCH v2] tracing: Don't account for cpu idle time with irqsoff tracers Stephen Boyd
2014-05-27 20:11 ` Arnd Bergmann
2014-05-27 21:48 ` Steven Rostedt
2014-05-27 22:21 ` Stephen Boyd
2014-05-27 23:30 ` Steven Rostedt
2014-05-28 0:11 ` Stephen Boyd
2014-05-28 0:23 ` Stephen Boyd
2014-05-28 0:42 ` Steven Rostedt
2014-05-28 7:24 ` Peter Zijlstra
2014-05-28 17:22 ` John Stultz [this message]
2014-05-28 0:25 ` Paul E. McKenney
2014-05-28 6:40 ` Arnd Bergmann
2014-05-28 6:44 ` Arnd Bergmann
2014-05-28 7:28 ` Peter Zijlstra
2014-05-28 14:09 ` 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=53861B5D.2040406@linaro.org \
--to=john.stultz@linaro.org \
--cc=arnd@arndb.de \
--cc=cminyard@mvista.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sboyd@codeaurora.org \
--cc=stano@meduna.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.