public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: zhidao su <soolaugust@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: soolaugust@gmail.com, jstultz@google.com, juri.lelli@redhat.com,
	mingo@redhat.com, linux-kernel@vger.kernel.org,
	Andrea Righi <arighi@nvidia.com>
Subject: Re: [PATCH] sched/deadline: Fix stale dl_defer_running in update_dl_entity() if-branch
Date: Sun, 05 Apr 2026 01:37:23 -0700 (PDT)	[thread overview]
Message-ID: <reply-peter-brain-wave-20260405@xiaomi.com> (raw)
In-Reply-To: <20260404102244.GB22575@noisy.programming.kicks-ass.net>

On Sat, Apr 04, 2026 at 12:22:44PM +0200, Peter Zijlstra wrote:
> Random brain wave...
>
> Since the dl_server is LLF (deferred), it will pretty much always trip
> the dl_entity_overflow() when interrupted, right? Does it make sense to
> use the revised wake-up rule for it, when appropriate?

Thanks for the brain wave!

Tested your diff — locktorture boot time drops to ~13s (vs ~37-52s with
the hack revert) and ksched_football ball_pos stays at 0.

I traced update_dl_entity() and found the else-branch hits all show
dl_defer_running=1 with dl_throttled=0 and dl_defer_armed=0 — that's
the [D:running] state, so the guard there is correct. The actual stale
case is in the if-branch (overflow=1, deadline not past, dl_defer_running=1),
which your diff handles via revised wakeup.

That also means our original else-branch fix was wrong — unconditionally
clearing dl_defer_running in [D:running] would corrupt a legitimately
running server's state.

Is your revised wakeup diff the intended replacement for 115135422562?
If so, happy to test further or help draft it into a proper patch.

Signed-off-by: zhidao su <suzhidao@xiaomi.com>

  reply	other threads:[~2026-04-05  8:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02 13:30 [PATCH] sched/deadline: Fix stale dl_defer_running in dl_server else-branch soolaugust
2026-04-03  0:05 ` John Stultz
2026-04-03  1:30   ` John Stultz
2026-04-03  8:12     ` [PATCH] sched/deadline: Fix stale dl_defer_running in update_dl_entity() if-branch soolaugust
2026-04-03 13:42       ` Peter Zijlstra
2026-04-03 13:58         ` Andrea Righi
2026-04-03 19:31         ` John Stultz
2026-04-03 22:46           ` Peter Zijlstra
2026-04-03 22:51             ` John Stultz
2026-04-03 22:54               ` John Stultz
2026-04-04 10:22             ` Peter Zijlstra
2026-04-05  8:37               ` zhidao su [this message]
2026-04-06 20:01               ` John Stultz
2026-04-06 20:03                 ` John Stultz

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=reply-peter-brain-wave-20260405@xiaomi.com \
    --to=soolaugust@gmail.com \
    --cc=arighi@nvidia.com \
    --cc=jstultz@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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