From: Tejun Heo <tj@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: David Vernet <void@manifault.com>,
linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH sched_ext/for-6.12] sched_ext: Handle cases where pick_task_scx() is called without preceding balance_scx()
Date: Thu, 5 Sep 2024 16:08:47 -1000 [thread overview]
Message-ID: <ZtpkL9qmRqF4u1wR@slm.duckdns.org> (raw)
In-Reply-To: <ZtpYGQ73WQcb95Fe@slm.duckdns.org>
On Thu, Sep 05, 2024 at 03:17:13PM -1000, Tejun Heo wrote:
> Did a bit of testing and it seems like it's mostly coming from delayed
> dequeue handling. pick_next_entity() does this:
>
> struct sched_entity *se = pick_eevdf(cfs_rq);
> if (se->sched_delayed) {
> dequeue_entities(rq, se, DEQUEUE_SLEEP | DEQUEUE_DELAYED);
> SCHED_WARN_ON(se->sched_delayed);
> SCHED_WARN_ON(se->on_rq);
> return NULL;
> }
>
> rq->cfs.nr_running includes the number of delay dequeued tasks which aren't
> really runnable, so it seems like balance_fair() saying yes and
> pick_next_entity() then hitting a delayed task. Maybe the solution is
> tracking the number of delayed ones and subtracting that from nr_running?
> I'm trying that but can't get the delayed count straight for some reason.
Backported http://lkml.kernel.org/r/Ztpjt5Pz9pJliblL@slm.duckdns.org to
v6.10 and it doesn't trigger (at least not easily) while the warning
triggers immediately on the current tip/sched/core. It does look like the
problem is delayed dequeue.
Thanks.
--
tejun
next prev parent reply other threads:[~2024-09-06 2:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 0:47 Tejun Heo
2024-09-05 9:28 ` Peter Zijlstra
2024-09-05 15:00 ` Peter Zijlstra
2024-09-05 16:41 ` Tejun Heo
2024-09-06 1:17 ` Tejun Heo
2024-09-06 2:08 ` Tejun Heo [this message]
2024-09-06 9:04 ` Peter Zijlstra
2024-09-06 18:16 ` [PATCH sched_ext/for-6.12] sched_ext: Temporarily work around pick_task_scx() being called without balance_scx() Tejun Heo
2024-11-09 20:17 ` [PATCH sched_ext/for-6.12] sched_ext: Handle cases where pick_task_scx() is called without preceding balance_scx() Tejun Heo
2024-11-09 20:50 ` [PATCH sched_ext/for-6.12-fixes v2] " Tejun Heo
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=ZtpkL9qmRqF4u1wR@slm.duckdns.org \
--to=tj@kernel.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=void@manifault.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®