From: Zqiang <qiang1.zhang@intel.com>
To: paulmck@kernel.org, frederic@kernel.org
Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] rcu: Avoid strict QS reporting in NMI context
Date: Sat, 18 Jun 2022 10:22:55 +0800 [thread overview]
Message-ID: <20220618022255.1697816-1-qiang1.zhang@intel.com> (raw)
Avoid invoke rcu_report_qs_rdp() in NMI handlers, in NMI handlers,
acquiring raw_spinlocks should be avoided, prevent NMI handlers
from blocking(spin) unnecessarily.
This commit make rcu_read_unlock_strict() early return when in
NMI context.
Signed-off-by: Zqiang <qiang1.zhang@intel.com>
---
kernel/rcu/tree_plugin.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index dc78726b993f..e7a36e248a8a 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -821,7 +821,7 @@ void rcu_read_unlock_strict(void)
{
struct rcu_data *rdp;
- if (irqs_disabled() || preempt_count() || !rcu_state.gp_kthread)
+ if (in_nmi() || irqs_disabled() || preempt_count() || !rcu_state.gp_kthread)
return;
rdp = this_cpu_ptr(&rcu_data);
rdp->cpu_no_qs.b.norm = false;
--
2.25.1
next reply other threads:[~2022-06-18 2:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-18 2:22 Zqiang [this message]
[not found] ` <CAFTL4hybOuURQD6LdxNiSShkvVT=qJ3_5qA59dOJ_47o9WEWYA@mail.gmail.com>
[not found] ` <PH0PR11MB5880465364ADD3E4637D8077DAAE9@PH0PR11MB5880.namprd11.prod.outlook.com>
2022-06-18 14:56 ` 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=20220618022255.1697816-1-qiang1.zhang@intel.com \
--to=qiang1.zhang@intel.com \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.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
all inboxes | Powered by JetHome®