[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240424152044.GS30852@noisy.programming.kicks-ass.net>
Date: Wed, 24 Apr 2024 17:20:44 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Mike Galbraith <efault@....de>
Cc: K Prateek Nayak <kprateek.nayak@....com>, mingo@...hat.com,
juri.lelli@...hat.com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, bristot@...hat.com, vschneid@...hat.com,
linux-kernel@...r.kernel.org, wuyun.abel@...edance.com,
tglx@...utronix.de, Chen Yu <yu.c.chen@...el.com>,
Oliver Sang <oliver.sang@...el.com>
Subject: Re: [RFC][PATCH 08/10] sched/fair: Implement delayed dequeue
On Thu, Apr 18, 2024 at 06:24:59PM +0200, Mike Galbraith wrote:
> Greetings,
>
> I tossed a couple rocks at it today, and seem to have hit the little
> bugger. The root cause seems to be doing the delay dequeue business on
> exiting tasks. Hunk #1 of hacklet below seems to quell the explosions.
>
Neat, Thanks! I was just about ready to go look at this again.
>
> ---
> kernel/sched/fair.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -5374,6 +5374,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, st
> update_curr(cfs_rq);
>
> if (sched_feat(DELAY_DEQUEUE) && sleep &&
> + !(entity_is_task(se) && (task_of(se)->flags & PF_EXITING)) &&
> !entity_eligible(cfs_rq, se)) {
> if (cfs_rq->next == se)
> cfs_rq->next = NULL;
> @@ -5495,14 +5496,14 @@ pick_next_entity(struct rq *rq, struct c
> }
>
> struct sched_entity *se = pick_eevdf(cfs_rq);
> - if (se->sched_delayed) {
> + while (se && se->sched_delayed) {
> dequeue_entities(rq, se, DEQUEUE_SLEEP | DEQUEUE_DELAYED);
> SCHED_WARN_ON(se->sched_delayed);
> SCHED_WARN_ON(se->on_rq);
> if (sched_feat(DELAY_ZERO) && se->vlag > 0)
> se->vlag = 0;
>
> - return NULL;
> + se = pick_eevdf(cfs_rq);
> }
> return se;
> }
>
Powered by blists - more mailing lists