From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Joel Fernandes <joel@joelfernandes.org>,
linux-kernel@vger.kernel.org, rcu@vger.kernel.org,
jiangshanlai@gmail.com, dipankar@in.ibm.com,
mathieu.desnoyers@efficios.com, josh@joshtriplett.org,
luto@kernel.org, byungchul.park@lge.com
Subject: Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts
Date: Wed, 13 Mar 2019 08:51:55 -0700 [thread overview]
Message-ID: <20190313155155.GN13351@linux.ibm.com> (raw)
In-Reply-To: <20190313112726.01d974fc@gandalf.local.home>
On Wed, Mar 13, 2019 at 11:27:26AM -0400, Steven Rostedt wrote:
> On Wed, 13 Mar 2019 11:09:48 -0400
> Joel Fernandes <joel@joelfernandes.org> wrote:
>
> > AFAICS, lockdep does not specifically track when we enter an interrupt, but
> > rather only tracks when interrupts are enabled/disabled.
>
> It does:
>
> #define __irq_enter() \
> do { \
> account_irq_enter_time(current); \
> preempt_count_add(HARDIRQ_OFFSET); \
> trace_hardirq_enter(); \
> } while (0)
>
> # define trace_hardirq_enter() \
> do { \
> current->hardirq_context++; \
> } while (0)
>
>
> And if the hardirq_context ever does not match "in_irq()" lockdep will
> complain loudly.
Good to know, thank you!
Does this mean that there is a better approach that Joel's suggestion?
I believe he would end up with something like this:
WARN_ON_ONCE(IS_ENABLED(CONFIG_PROVE_RCU) && !in_irq());
It would be nice if there is something like this:
lockdep_assert_in_irq_handler();
But I haven't seen this. (Not that I have looked particularly hard for
such a thing, mind you!)
Thanx, Paul
next prev parent reply other threads:[~2019-03-13 15:52 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 22:20 [PATCH tip/core/rcu 0/19] RCU flavor-consolidation changes for v4.20/v5.0 Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 01/19] rcu: Refactor rcu_{nmi,irq}_{enter,exit}() Paul E. McKenney
2018-08-30 18:10 ` Steven Rostedt
2018-08-30 23:02 ` Paul E. McKenney
2018-08-31 2:25 ` Byungchul Park
2018-08-29 22:20 ` [PATCH tip/core/rcu 02/19] rcu: Defer reporting RCU-preempt quiescent states when disabled Paul E. McKenney
2018-10-29 11:24 ` Ran Rozenstein
2018-10-29 14:27 ` Paul E. McKenney
2018-10-30 3:44 ` Joel Fernandes
2018-10-30 12:58 ` Paul E. McKenney
2018-10-30 22:21 ` Joel Fernandes
2018-10-31 18:22 ` Paul E. McKenney
2018-11-02 19:43 ` Paul E. McKenney
2018-11-26 13:55 ` Ran Rozenstein
2018-11-26 19:00 ` Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 03/19] rcutorture: Test extended "rcu" read-side critical sections Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 04/19] rcu: Allow processing deferred QSes for exiting RCU-preempt readers Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 05/19] rcu: Remove now-unused ->b.exp_need_qs field from the rcu_special union Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts Paul E. McKenney
2019-03-11 13:39 ` Joel Fernandes
2019-03-11 22:29 ` Paul E. McKenney
2019-03-12 15:05 ` Joel Fernandes
2019-03-12 15:20 ` Paul E. McKenney
2019-03-13 15:09 ` Joel Fernandes
2019-03-13 15:27 ` Steven Rostedt
2019-03-13 15:51 ` Paul E. McKenney [this message]
2019-03-13 16:51 ` Steven Rostedt
2019-03-13 18:07 ` Paul E. McKenney
2019-03-14 12:31 ` Joel Fernandes
2019-03-14 13:36 ` Steven Rostedt
2019-03-14 13:37 ` Steven Rostedt
2019-03-14 21:27 ` Joel Fernandes
2019-03-15 7:31 ` Byungchul Park
2019-03-15 7:44 ` Byungchul Park
2019-03-15 13:46 ` Joel Fernandes
2018-08-29 22:20 ` [PATCH tip/core/rcu 07/19] rcu: Apply RCU-bh QSes to RCU-sched and RCU-preempt when safe Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 08/19] rcu: Report expedited grace periods at context-switch time Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 09/19] rcu: Define RCU-bh update API in terms of RCU Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 10/19] rcu: Update comments and help text for no more RCU-bh updaters Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 11/19] rcu: Drop "wake" parameter from rcu_report_exp_rdp() Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 12/19] rcu: Fix typo in rcu_get_gp_kthreads_prio() header comment Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 13/19] rcu: Define RCU-sched API in terms of RCU for Tree RCU PREEMPT builds Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 14/19] rcu: Express Tiny RCU updates in terms of RCU rather than RCU-sched Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 15/19] rcu: Remove RCU_STATE_INITIALIZER() Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 16/19] rcu: Eliminate rcu_state structure's ->call field Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 17/19] rcu: Remove rcu_state structure's ->rda field Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 18/19] rcu: Remove rcu_state_p pointer to default rcu_state structure Paul E. McKenney
2018-08-29 22:20 ` [PATCH tip/core/rcu 19/19] rcu: Remove rcu_data_p pointer to default rcu_data structure Paul E. McKenney
2018-08-29 22:22 ` [PATCH tip/core/rcu 0/19] RCU flavor-consolidation changes for v4.20/v5.0 Paul E. McKenney
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=20190313155155.GN13351@linux.ibm.com \
--to=paulmck@linux.ibm.com \
--cc=byungchul.park@lge.com \
--cc=dipankar@in.ibm.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.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