From: Chen Yu <yu.c.chen@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Biju Das <biju.das.jz@bp.renesas.com>,
"bsegall@google.com" <bsegall@google.com>,
"bristot@redhat.com" <bristot@redhat.com>,
"chris.hyser@oracle.com" <chris.hyser@oracle.com>,
"corbet@lwn.net" <corbet@lwn.net>,
"dietmar.eggemann@arm.com" <dietmar.eggemann@arm.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"joel@joelfernandes.org" <joel@joelfernandes.org>,
"joshdon@google.com" <joshdon@google.com>,
"juri.lelli@redhat.com" <juri.lelli@redhat.com>,
"kprateek.nayak@amd.com" <kprateek.nayak@amd.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mingo@kernel.org" <mingo@kernel.org>,
"patrick.bellasi@matbug.net" <patrick.bellasi@matbug.net>,
Pavel Machek <pavel@ucw.cz>, "pjt@google.com" <pjt@google.com>,
"qperret@google.com" <qperret@google.com>,
"qyousef@layalina.io" <qyousef@layalina.io>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"tim.c.chen@linux.intel.com" <tim.c.chen@linux.intel.com>,
"timj@gnu.org" <timj@gnu.org>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"youssefesmat@chromium.org" <youssefesmat@chromium.org>,
"mgorman@suse.de" <mgorman@suse.de>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH] sched/fair: fix pick_eevdf to always find the correct se
Date: Sat, 7 Oct 2023 08:37:02 +0800 [thread overview]
Message-ID: <ZSCoLllO/cYnnIMi@chenyu5-mobl2.ccr.corp.intel.com> (raw)
In-Reply-To: <20231006192445.GE743@noisy.programming.kicks-ass.net>
On 2023-10-06 at 21:24:45 +0200, Peter Zijlstra wrote:
> On Fri, Oct 06, 2023 at 05:55:01PM +0200, Peter Zijlstra wrote:
>
> > And yeah, min_deadline is hosed somehow.
> >
> > migration/28-185 [028] d..2. 70.264274: validate_cfs_rq: --- /
> > migration/28-185 [028] d..2. 70.264277: __print_se: ffff88845cf48080 w: 1024 ve: -58857638 lag: 870381 vd: -55861854 vmd: -66302085 E (11372/tr)
> > migration/28-185 [028] d..2. 70.264280: __print_se: ffff88810d165800 w: 25 ve: -80323686 lag: 22336429 vd: -41496434 vmd: -66302085 E (-1//autogroup-31)
> > migration/28-185 [028] d..2. 70.264282: __print_se: ffff888108379000 w: 25 ve: 0 lag: -57987257 vd: 114632828 vmd: 114632828 N (-1//autogroup-33)
> > migration/28-185 [028] d..2. 70.264283: validate_cfs_rq: min_deadline: -55861854 avg_vruntime: -62278313462 / 1074 = -57987256
> >
> > I need to go make dinner (kids hungry), but I'll see if I can figure out
> > how this happens...
>
> *sigh*, does the below help?
>
> ---
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 04fbcbda97d5..6a670f119efa 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -3632,6 +3747,7 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se,
> */
> deadline = div_s64(deadline * old_weight, weight);
> se->deadline = se->vruntime + deadline;
> + min_deadline_cb_propagate(&se->run_node, NULL);
> }
>
> #ifdef CONFIG_SMP
Is it because without this patch, the se->deadline is not always synced with se->min_deadline,
then in pick_eevdf() the following condition could not be met, thus we get a NULL candidate
and has to pick the leftmost one?
if (se->deadline == se->min_deadline)
Regarding the circular locking warning triggered by printk, does it mean we should not get a
NULL candidate from __pick_eevdf() in theory? And besides, we should not use printk with rq lock
hold?
thanks,
Chenyu
next prev parent reply other threads:[~2023-10-07 0:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 7:31 Biju Das
2023-10-05 7:58 ` Biju Das
2023-10-05 15:02 ` Peter Zijlstra
2023-10-05 15:08 ` Biju Das
2023-10-06 8:36 ` Marek Szyprowski
2023-10-06 9:38 ` Biju Das
[not found] ` <553e2ee4-ab3a-4635-a74f-0ba4cc03f3f9@samsung.com>
2023-10-06 10:31 ` Mike Galbraith
2023-10-06 14:00 ` Peter Zijlstra
2023-10-06 14:39 ` Mike Galbraith
2023-10-06 15:55 ` Peter Zijlstra
2023-10-06 16:54 ` Mike Galbraith
2023-10-06 19:24 ` Peter Zijlstra
2023-10-06 20:15 ` Marek Szyprowski
2023-10-06 23:27 ` Mike Galbraith
2023-10-07 0:37 ` Chen Yu [this message]
2023-10-07 6:26 ` Biju Das
2023-10-07 6:42 ` Chen Yu
2023-10-09 14:27 ` Phil Auld
2023-10-10 2:08 ` Chen Yu
2023-10-07 6:24 ` Biju Das
2023-10-09 7:53 ` [tip: sched/urgent] sched/eevdf: Fix min_deadline heap integrity tip-bot2 for Peter Zijlstra
2023-10-05 15:11 ` [PATCH] sched/fair: fix pick_eevdf to always find the correct se Peter Zijlstra
-- strict thread matches above, loose matches on Subject: below --
2023-05-31 11:58 [PATCH 00/15] sched: EEVDF and latency-nice and/or slice-attr Peter Zijlstra
2023-05-31 11:58 ` [PATCH 05/15] sched/fair: Implement an EEVDF like policy Peter Zijlstra
2023-09-30 0:09 ` [PATCH] sched/fair: fix pick_eevdf to always find the correct se Benjamin Segall
[not found] ` <CGME20231004203940eucas1p2f73b017497d1f4239a6e236fdb6019e2@eucas1p2.samsung.com>
2023-10-04 20:39 ` Marek Szyprowski
2023-10-11 12:12 ` Abel Wu
2023-10-11 13:14 ` Peter Zijlstra
2023-10-11 21:01 ` Benjamin Segall
2023-10-12 10:25 ` Abel Wu
2023-10-12 17:51 ` Benjamin Segall
2023-10-13 3:46 ` Abel Wu
2023-10-13 16:51 ` Benjamin Segall
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=ZSCoLllO/cYnnIMi@chenyu5-mobl2.ccr.corp.intel.com \
--to=yu.c.chen@intel.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=chris.hyser@oracle.com \
--cc=corbet@lwn.net \
--cc=dietmar.eggemann@arm.com \
--cc=efault@gmx.de \
--cc=gregkh@linuxfoundation.org \
--cc=joel@joelfernandes.org \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=patrick.bellasi@matbug.net \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=qperret@google.com \
--cc=qyousef@layalina.io \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tim.c.chen@linux.intel.com \
--cc=timj@gnu.org \
--cc=vincent.guittot@linaro.org \
--cc=youssefesmat@chromium.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
Powered by JetHome