[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <982456f0abca321b874b7974bdf17d1a605c3d38.camel@gmx.de>
Date: Thu, 07 Nov 2024 10:46:53 +0100
From: Mike Galbraith <efault@....de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Phil Auld <pauld@...hat.com>, mingo@...hat.com, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com, rostedt@...dmis.org,
bsegall@...gle.com, mgorman@...e.de, vschneid@...hat.com,
linux-kernel@...r.kernel.org, kprateek.nayak@....com,
wuyun.abel@...edance.com, youssefesmat@...omium.org, tglx@...utronix.de
Subject: Re: [PATCH 17/24] sched/fair: Implement delayed dequeue
On Thu, 2024-11-07 at 05:03 +0100, Mike Galbraith wrote:
>
> I built that patch out of curiosity, and yeah, set_next_task_fair()
> finding a cfs_rq->curr ends play time pretty quickly.
The below improved uptime, and trace_printk() says it's doing the
intended, so I suppose I'll add a feature and see what falls out.
---
kernel/sched/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3794,7 +3794,7 @@ static int ttwu_runnable(struct task_str
int queue_flags = DEQUEUE_NOCLOCK;
if (p->se.sched_delayed)
- queue_flags |= DEQUEUE_DELAYED;
+ queue_flags |= (DEQUEUE_DELAYED | DEQUEUE_SLEEP);
/*
* Since we're not current anywhere *AND* hold pi_lock, dequeue
@@ -3802,7 +3802,7 @@ static int ttwu_runnable(struct task_str
* case further along the ttwu() path.
*/
if (rq->nr_running > 1 && p->nr_cpus_allowed > 1) {
- dequeue_task(rq, p, DEQUEUE_SLEEP | queue_flags);
+ dequeue_task(rq, p, queue_flags);
return 0;
}
Powered by blists - more mailing lists