mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Cc: linux-kernel@vger.kernel.org,
	Josh Triplett <josh@joshtriplett.org>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	rcu@vger.kernel.org, fweisbec@gmail.com, urezki@gmail.com
Subject: Re: [PATCH v2 rcu/dev 2/2] rcu: Disable laziness if lazy-tracking says so
Date: Sun, 15 Jan 2023 15:54:55 -0500	[thread overview]
Message-ID: <20230115155455.0fb66c12@rorschach.local.home> (raw)
In-Reply-To: <20230112005223.2329802-2-joel@joelfernandes.org>

On Thu, 12 Jan 2023 00:52:23 +0000
"Joel Fernandes (Google)" <joel@joelfernandes.org> wrote:

>  
>  static void
> -__call_rcu_common(struct rcu_head *head, rcu_callback_t func, bool lazy)
> +__call_rcu_common(struct rcu_head *head, rcu_callback_t func, bool lazy_in)
>  {
>  	static atomic_t doublefrees;
>  	unsigned long flags;
>  	struct rcu_data *rdp;
> -	bool was_alldone;
> +	bool was_alldone, lazy;

I'm curious to why the the extra variable.

>  
>  	/* Misaligned rcu_head! */
>  	WARN_ON_ONCE((unsigned long)head & (sizeof(void *) - 1));
> @@ -2622,6 +2622,7 @@ __call_rcu_common(struct rcu_head *head, rcu_callback_t func, bool lazy)
>  	kasan_record_aux_stack_noalloc(head);
>  	local_irq_save(flags);
>  	rdp = this_cpu_ptr(&rcu_data);
> +	lazy = lazy_in && !rcu_async_should_hurry();

Wouldn't just having:

	lazy = lazy && !rcu_async_should_hurry();

be sufficient?

-- Steve

>  
>  	/* Add the callback to our list. */
>  	if (unlikely(!rcu_segcblist_is_enabled(&rdp->cblist))) {
> -- 

  reply	other threads:[~2023-01-15 20:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12  0:52 [PATCH v2 rcu/dev 1/2] rcu: Track laziness during boot and suspend Joel Fernandes (Google)
2023-01-12  0:52 ` [PATCH v2 rcu/dev 2/2] rcu: Disable laziness if lazy-tracking says so Joel Fernandes (Google)
2023-01-15 20:54   ` Steven Rostedt [this message]
2023-01-15 21:29     ` Joel Fernandes
2023-01-12  1:29 ` [PATCH v2 rcu/dev 1/2] rcu: Track laziness during boot and suspend Paul E. McKenney
2023-01-12  1:56   ` Joel Fernandes
2023-01-12 19:27 ` Paul E. McKenney
2023-01-12 22:25   ` Joel Fernandes
2023-01-12 23:50     ` Paul E. McKenney
2023-01-15 21:25 ` Steven Rostedt
2023-01-15 21:34   ` Joel Fernandes
2023-01-16  4:26     ` Paul E. McKenney
2023-01-17 19:32     ` Steven Rostedt
2023-01-17 19:37       ` Paul E. McKenney
2023-01-17 19:45         ` Joel Fernandes
2023-01-17 21:40         ` Steven Rostedt
2023-01-18  3:51           ` 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=20230115155455.0fb66c12@rorschach.local.home \
    --to=rostedt@goodmis.org \
    --cc=fweisbec@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=urezki@gmail.com \
    /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®