mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neeraj Upadhyay <quic_neeraju@quicinc.com>
To: "Paul E. McKenney" <paulmck@kernel.org>, <rcu@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <kernel-team@fb.com>,
	<rostedt@goodmis.org>, Zqiang <qiang1.zhang@intel.com>
Subject: Re: [PATCH rcu 04/12] rcu: Immediately boost preempted readers for strict grace periods
Date: Tue, 21 Jun 2022 11:30:39 +0530	[thread overview]
Message-ID: <789b9966-f899-3882-768d-e996e43ec6da@quicinc.com> (raw)
In-Reply-To: <20220620222032.3839547-4-paulmck@kernel.org>



On 6/21/2022 3:50 AM, Paul E. McKenney wrote:
> From: Zqiang <qiang1.zhang@intel.com>
> 
> The intent of the CONFIG_RCU_STRICT_GRACE_PERIOD Konfig option is to
> cause normal grace periods to complete quickly in order to better catch
> errors resulting from improperly leaking pointers from RCU read-side
> critical sections.  However, kernels built with this option enabled still
> wait for some hundreds of milliseconds before boosting RCU readers that
> have been preempted within their current critical section.  The value
> of this delay is set by the CONFIG_RCU_BOOST_DELAY Kconfig option,
> which defaults to 500 milliseconds.
> 
> This commit therefore causes kernels build with strict grace periods
> to ignore CONFIG_RCU_BOOST_DELAY.  This causes rcu_initiate_boost()
> to start boosting immediately after all CPUs on a given leaf rcu_node
> structure have passed through their quiescent states.
> 
> Signed-off-by: Zqiang <qiang1.zhang@intel.com>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> ---

Reviewed-by: Neeraj Upadhyay <quic_neeraju@quicinc.com>


Thanks
Neeraj

>   kernel/rcu/tree_plugin.h | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> index 440d9e02a26e0..53d05eb804121 100644
> --- a/kernel/rcu/tree_plugin.h
> +++ b/kernel/rcu/tree_plugin.h
> @@ -1140,7 +1140,8 @@ static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags)
>   	    (rnp->gp_tasks != NULL &&
>   	     rnp->boost_tasks == NULL &&
>   	     rnp->qsmask == 0 &&
> -	     (!time_after(rnp->boost_time, jiffies) || rcu_state.cbovld))) {
> +	     (!time_after(rnp->boost_time, jiffies) || rcu_state.cbovld ||
> +	      IS_ENABLED(CONFIG_RCU_STRICT_GRACE_PERIOD)))) {
>   		if (rnp->exp_tasks == NULL)
>   			WRITE_ONCE(rnp->boost_tasks, rnp->gp_tasks);
>   		raw_spin_unlock_irqrestore_rcu_node(rnp, flags);

  reply	other threads:[~2022-06-21  6:00 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 22:20 [PATCH rcu 0/12] Miscellaneous fixes for v5.20 Paul E. McKenney
2022-06-20 22:20 ` [PATCH rcu 01/12] rcu: Decrease FQS scan wait time in case of callback overloading Paul E. McKenney
2022-06-21  5:29   ` Neeraj Upadhyay
2022-06-21 22:19     ` Paul E. McKenney
2022-06-22 11:46       ` Neeraj Upadhyay
2022-06-20 22:20 ` [PATCH rcu 02/12] rcu: Avoid tracing a few functions executed in stop machine Paul E. McKenney
2022-06-21  5:47   ` Neeraj Upadhyay
2022-06-21 22:21     ` Paul E. McKenney
2022-06-22 11:50       ` Neeraj Upadhyay
2022-06-22 15:35         ` Paul E. McKenney
2022-06-22 15:49           ` Neeraj Upadhyay
2022-06-23  0:29             ` Paul E. McKenney
2022-06-20 22:20 ` [PATCH rcu 03/12] rcu: Add rnp->cbovldmask check in rcutree_migrate_callbacks() Paul E. McKenney
2022-06-21  5:57   ` Neeraj Upadhyay
2022-06-21 22:22     ` Paul E. McKenney
2022-06-20 22:20 ` [PATCH rcu 04/12] rcu: Immediately boost preempted readers for strict grace periods Paul E. McKenney
2022-06-21  6:00   ` Neeraj Upadhyay [this message]
2022-06-20 22:20 ` [PATCH rcu 05/12] rcu: Forbid RCU_STRICT_GRACE_PERIOD in TINY_RCU kernels Paul E. McKenney
2022-06-21  6:02   ` Neeraj Upadhyay
2022-06-20 22:20 ` [PATCH rcu 06/12] locking/csd_lock: Change csdlock_debug from early_param to __setup Paul E. McKenney
2022-06-20 22:20 ` [PATCH rcu 07/12] rcu: tiny: Record kvfree_call_rcu() call stack for KASAN Paul E. McKenney
2022-06-21  6:31   ` Neeraj Upadhyay
2022-06-21 19:31     ` Paul E. McKenney
2022-06-21 21:14       ` Marco Elver
2022-06-21 22:17         ` Paul E. McKenney
2022-06-20 22:20 ` [PATCH rcu 08/12] rcu: Cleanup RCU urgency state for offline CPU Paul E. McKenney
2022-06-21  7:03   ` Neeraj Upadhyay
2022-06-21 22:24     ` Paul E. McKenney
2022-06-20 22:20 ` [PATCH rcu 09/12] rcu/kvfree: Remove useless monitor_todo flag Paul E. McKenney
2022-06-21 10:02   ` Neeraj Upadhyay
2022-06-20 22:20 ` [PATCH rcu 10/12] rcu: Initialize first_gp_fqs at declaration in rcu_gp_fqs() Paul E. McKenney
2022-06-20 22:20 ` [PATCH rcu 11/12] rcu/tree: Add comment to describe GP-done condition in fqs loop Paul E. McKenney
2022-06-20 22:20 ` [PATCH rcu 12/12] srcu: Block less aggressively for expedited grace periods Paul E. McKenney
2022-06-21  2:00   ` Zhangfei Gao
2022-06-21  3:15     ` Paul E. McKenney
2022-06-21  7:43   ` Shameerali Kolothum Thodi
2022-06-21 19:36     ` Paul E. McKenney
2022-06-21 10:13   ` Neeraj Upadhyay
2022-06-21 22:25     ` 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=789b9966-f899-3882-768d-e996e43ec6da@quicinc.com \
    --to=quic_neeraju@quicinc.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=qiang1.zhang@intel.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

all inboxes | Powered by JetHome®