From: Zqiang <qiang1.zhang@intel.com>
To: paulmck@kernel.org, frederic@kernel.org,
quic_neeraju@quicinc.com, joel@joelfernandes.org
Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] rcu-tasks: Make RCU Tasks Trace checking for userspace execution
Date: Mon, 18 Jul 2022 08:16:10 +0800 [thread overview]
Message-ID: <20220718001610.263700-1-qiang1.zhang@intel.com> (raw)
For RCU tasks trace, the userspace execution is also a valid quiescent
state, if the task is in userspace, the ->trc_reader_nesting should be
zero and if the ->trc_reader_special.b.need_qs is not set, set the
tasks ->trc_reader_special.b.need_qs is TRC_NEED_QS_CHECKED, this cause
grace-period kthread remove it from holdout list if it remains here.
This commit add rcu_tasks_trace_qs() to rcu_flavor_sched_clock_irq()
when the kernel built with no PREEMPT_RCU.
Signed-off-by: Zqiang <qiang1.zhang@intel.com>
---
v1->v2:
Fix build error due to undeclared rcu_tasks_trace_qs(), note in no-PREEMPT_RCU
kernel, the RCU Tasks is replaced by RCU, so rcu_note_voluntary_context_switch()
only include rcu_tasks_trace_qs().
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 4152816dd29f..5fb0b2dd24fd 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -976,7 +976,7 @@ static void rcu_flavor_sched_clock_irq(int user)
* neither access nor modify, at least not while the
* corresponding CPU is online.
*/
-
+ rcu_note_voluntary_context_switch(current);
rcu_qs();
}
}
--
2.25.1
next reply other threads:[~2022-07-18 0:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-18 0:16 Zqiang [this message]
2022-07-18 15:21 ` [PATCH v2] rcu-tasks: Make RCU Tasks Trace checking for userspace execution Paul E. McKenney
2022-07-18 23:54 ` Zhang, Qiang1
2022-07-19 0:26 ` Paul E. McKenney
2022-07-19 4:34 ` Zhang, Qiang1
2022-07-19 14:38 ` 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=20220718001610.263700-1-qiang1.zhang@intel.com \
--to=qiang1.zhang@intel.com \
--cc=frederic@kernel.org \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=quic_neeraju@quicinc.com \
--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;
as well as URLs for NNTP newsgroup(s).