public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: vschneid@redhat.com, linux-kernel@vger.kernel.org,
	sfr@canb.auug.org.au, linux-next@vger.kernel.org,
	kernel-team@meta.com
Subject: Re: [BUG almost bisected] Splat in dequeue_rt_stack() and build error
Date: Tue, 8 Oct 2024 13:11:50 +0200	[thread overview]
Message-ID: <20241008111150.GD17263@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <9961cb9c-70f0-405b-b259-575586905ae0@paulmck-laptop>

On Sun, Oct 06, 2024 at 01:44:53PM -0700, Paul E. McKenney wrote:

> With your patch, I got 24 failures out of 100 TREE03 runs of 18 hours
> each.  The failures were different, though, mostly involving boost
> failures in which RCU priority boosting didn't actually result in the
> low-priority readers getting boosted.  

Somehow I feel this is progress, albeit very minor :/

> There were also a number of "sched: DL replenish lagged too much"
> messages, but it looks like this was a symptom of the ftrace dump.
> 
> Given that this now involves priority boosting, I am trying 400*TREE03
> with each guest OS restricted to four CPUs to see if that makes things
> happen more quickly, and will let you know how this goes.
> 
> Any other debug I should apply?

The sched_pi_setprio tracepoint perhaps?

I've read all the RCU_BOOST and rtmutex code (once again), and I've been
running pi_stress with --sched id=low,policy=other to ensure the code
paths in question are taken. But so far so very nothing :/

(Noting that both RCU_BOOST and PI futexes use the same rt_mutex / PI API)

You know RCU_BOOST better than me.. then again, it is utterly weird this
is apparently affected. I've gotta ask, a kernel with my patch on and
additionally flipping kernel/sched/features.h:SCHED_FEAT(DELAY_DEQUEUE,
false) functions as expected?


One very minor thing I noticed while I read the code, do with as you
think best...

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 1c7cbd145d5e..95061119653d 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -1071,10 +1071,6 @@ static int rcu_boost(struct rcu_node *rnp)
 	 * Recheck under the lock: all tasks in need of boosting
 	 * might exit their RCU read-side critical sections on their own.
 	 */
-	if (rnp->exp_tasks == NULL && rnp->boost_tasks == NULL) {
-		raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
-		return 0;
-	}
 
 	/*
 	 * Preferentially boost tasks blocking expedited grace periods.
@@ -1082,10 +1078,13 @@ static int rcu_boost(struct rcu_node *rnp)
 	 * expedited grace period must boost all blocked tasks, including
 	 * those blocking the pre-existing normal grace period.
 	 */
-	if (rnp->exp_tasks != NULL)
-		tb = rnp->exp_tasks;
-	else
+	tb = rnp->exp_tasks;
+	if (!tb)
 		tb = rnp->boost_tasks;
+	if (!tb) {
+		raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
+		return 0;
+	}
 
 	/*
 	 * We boost task t by manufacturing an rt_mutex that appears to

  parent reply	other threads:[~2024-10-08 11:11 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 21:57 [BUG almost bisected] Splat in dequeue_rt_stack() and build error Paul E. McKenney
2024-08-22 23:01 ` Paul E. McKenney
2024-08-23  7:47 ` Peter Zijlstra
2024-08-23 12:46   ` Paul E. McKenney
2024-08-23 21:51     ` Paul E. McKenney
2024-08-24  6:54       ` Peter Zijlstra
2024-08-24 15:26         ` Paul E. McKenney
2024-08-25  2:10           ` Paul E. McKenney
2024-08-25 19:36             ` Paul E. McKenney
2024-08-26 11:44   ` Valentin Schneider
2024-08-26 16:31     ` Paul E. McKenney
2024-08-27 10:03       ` Valentin Schneider
2024-08-27 15:41         ` Valentin Schneider
2024-08-27 17:33           ` Paul E. McKenney
2024-08-27 18:35             ` Paul E. McKenney
2024-08-27 20:30               ` Valentin Schneider
2024-08-27 20:36                 ` Paul E. McKenney
2024-08-28 12:35                   ` Valentin Schneider
2024-08-28 13:03                     ` Paul E. McKenney
2024-08-28 13:40                       ` Paul E. McKenney
2024-08-28 13:44                     ` Chen Yu
2024-08-28 14:32                       ` Valentin Schneider
2024-08-28 16:35                         ` Paul E. McKenney
2024-08-28 18:17                           ` Valentin Schneider
2024-08-28 18:39                             ` Paul E. McKenney
2024-08-29 10:28                               ` Paul E. McKenney
2024-08-29 13:50                                 ` Valentin Schneider
2024-08-29 14:13                                   ` Paul E. McKenney
2024-09-08 16:32                                     ` Paul E. McKenney
2024-09-13 14:08                                       ` Paul E. McKenney
2024-09-13 16:55                                         ` Valentin Schneider
2024-09-13 18:00                                           ` Paul E. McKenney
2024-09-30 19:09                                             ` Paul E. McKenney
2024-09-30 20:44                                               ` Valentin Schneider
2024-10-01 10:10                                                 ` Paul E. McKenney
2024-10-01 12:52                                                   ` Valentin Schneider
2024-10-01 16:47                                                     ` Paul E. McKenney
2024-10-02  9:01                                                       ` Tomas Glozar
2024-10-02 12:07                                                         ` Paul E. McKenney
2024-10-10 11:24                                                         ` Tomas Glozar
2024-10-10 15:01                                                           ` Paul E. McKenney
2024-10-10 23:28                                                             ` Paul E. McKenney
2024-10-14 18:55                                                               ` Paul E. McKenney
2024-10-21 19:25                                                                 ` Paul E. McKenney
2024-11-14 18:16                                                                   ` Paul E. McKenney
2024-12-15 18:31                                                                     ` Paul E. McKenney
2024-12-16 14:38                                                                       ` Tomas Glozar
2024-12-16 19:36                                                                         ` Paul E. McKenney
2024-12-17 16:42                                                                           ` Paul E. McKenney
2024-10-22  6:33                                                           ` Tomas Glozar
2024-10-03  8:40 ` Peter Zijlstra
2024-10-03  8:47   ` Peter Zijlstra
2024-10-03  9:27     ` Peter Zijlstra
2024-10-03 12:28       ` Peter Zijlstra
2024-10-03 12:45         ` Paul E. McKenney
2024-10-03 14:22           ` Peter Zijlstra
2024-10-03 16:04             ` Paul E. McKenney
2024-10-03 18:50               ` Peter Zijlstra
2024-10-03 19:12                 ` Paul E. McKenney
2024-10-04 13:22                 ` Paul E. McKenney
2024-10-04 13:35                 ` Peter Zijlstra
2024-10-06 20:44                   ` Paul E. McKenney
2024-10-07  9:34                     ` Peter Zijlstra
2024-10-08 11:11                     ` Peter Zijlstra [this message]
2024-10-08 16:24                       ` Paul E. McKenney
2024-10-08 22:34                         ` Paul E. McKenney
2024-10-03 12:44       ` 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=20241008111150.GD17263@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=vschneid@redhat.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