From: Peter Zijlstra <peterz@infradead.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: mingo@redhat.com, juri.lelli@redhat.com,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, vschneid@redhat.com,
linux-kernel@vger.kernel.org, kprateek.nayak@amd.com,
pauld@redhat.com, efault@gmx.de, luis.machado@arm.com
Subject: Re: [PATCH 7/9] sched/fair: Do not try to migrate delayed dequeue task
Date: Thu, 28 Nov 2024 10:49:36 +0100 [thread overview]
Message-ID: <20241128094936.GA24400@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20241128092750.2541735-8-vincent.guittot@linaro.org>
On Thu, Nov 28, 2024 at 10:27:48AM +0100, Vincent Guittot wrote:
> Migrating a delayed dequeued task doesn't help in balancing the number
> of runnable tasks in the system.
But it can help balance the weight; furthermore, by moving them to a
lighter queue, they'll get picked sooner and disappear sooner.
Perhaps make it: p->se.sched_delayed && !env->sd->nr_balance_failed ?
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> ---
> kernel/sched/fair.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 1b4f1b610543..9d80f3a61082 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -9405,11 +9405,15 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
>
> /*
> * We do not migrate tasks that are:
> - * 1) throttled_lb_pair, or
> - * 2) cannot be migrated to this CPU due to cpus_ptr, or
> - * 3) running (obviously), or
> - * 4) are cache-hot on their current CPU.
> + * 1) delayed dequeued, or
> + * 2) throttled_lb_pair, or
> + * 3) cannot be migrated to this CPU due to cpus_ptr, or
> + * 4) running (obviously), or
> + * 5) are cache-hot on their current CPU.
> */
> + if (p->se.sched_delayed)
> + return 0;
> +
> if (throttled_lb_pair(task_group(p), env->src_cpu, env->dst_cpu))
> return 0;
>
> --
> 2.43.0
>
next prev parent reply other threads:[~2024-11-28 9:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-28 9:27 [PATCH 0/9] sched/fair: Fix statistics with delayed dequeue Vincent Guittot
2024-11-28 9:27 ` [PATCH 1/9] sched/eevdf: More PELT vs DELAYED_DEQUEUE Vincent Guittot
2024-11-28 9:27 ` [PATCH 2/9] sched/fair: Add new cfs_rq.h_nr_enqueued Vincent Guittot
2024-11-28 9:56 ` Peter Zijlstra
2024-11-28 10:24 ` Vincent Guittot
2024-11-28 10:27 ` Peter Zijlstra
2024-11-28 9:27 ` [PATCH 3/9] sched/fair: Rename cfs_rq.idle_h_nr_running into h_nr_idle Vincent Guittot
2024-11-28 9:27 ` [PATCH 4/9] sched/fair: Remove unused cfs_rq.idle_nr_running Vincent Guittot
2024-11-28 9:27 ` [PATCH 5/9] sched/fair: Rename cfs_rq.nr_running into nr_enqueued Vincent Guittot
2024-11-28 9:27 ` [PATCH 6/9] sched/fair: Removed unsued cfs_rq.h_nr_delayed Vincent Guittot
2024-11-28 10:03 ` Peter Zijlstra
2024-11-28 10:15 ` Peter Zijlstra
2024-11-28 10:32 ` Vincent Guittot
2024-11-28 9:27 ` [PATCH 7/9] sched/fair: Do not try to migrate delayed dequeue task Vincent Guittot
2024-11-28 9:49 ` Peter Zijlstra [this message]
2024-11-28 10:03 ` Vincent Guittot
2024-11-28 10:15 ` Peter Zijlstra
2024-11-28 9:27 ` [PATCH 8/9] sched/fair: Fix sched_can_stop_tick() for fair tasks Vincent Guittot
2024-11-28 9:27 ` [PATCH 9/9] sched/fair: Fix variable declaration position Vincent Guittot
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=20241128094936.GA24400@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=efault@gmx.de \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luis.machado@arm.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=pauld@redhat.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.