The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "tip-bot2 for Vincent Guittot" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/core] sched/fair: Do not try to migrate delayed dequeue task
Date: Mon, 09 Dec 2024 11:00:03 -0000	[thread overview]
Message-ID: <173374200362.412.2553443361090747763.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20241202174606.4074512-11-vincent.guittot@linaro.org>

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     61b82dfb6b7e1f951fd1e95198a2aee2ccf6a167
Gitweb:        https://git.kernel.org/tip/61b82dfb6b7e1f951fd1e95198a2aee2ccf6a167
Author:        Vincent Guittot <vincent.guittot@linaro.org>
AuthorDate:    Mon, 02 Dec 2024 18:46:05 +01:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 09 Dec 2024 11:48:13 +01:00

sched/fair: Do not try to migrate delayed dequeue task

Migrating a delayed dequeued task doesn't help in balancing the number
of runnable tasks in the system.

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Link: https://lore.kernel.org/r/20241202174606.4074512-11-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 84c0191..2aa1d0c 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9391,11 +9391,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 unless we migrate load, 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) && (env->migration_type != migrate_load))
+		return 0;
+
 	if (throttled_lb_pair(task_group(p), env->src_cpu, env->dst_cpu))
 		return 0;
 

  reply	other threads:[~2024-12-09 11:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-02 17:45 [PATCH 0/11 v3] sched/fair: Fix statistics with delayed dequeue Vincent Guittot
2024-12-02 17:45 ` [PATCH 01/11 v3] sched/fair: Fix sched_can_stop_tick() for fair tasks Vincent Guittot
2024-12-09 11:00   ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2024-12-02 17:45 ` [PATCH 02/11 v3] sched/eevdf: More PELT vs DELAYED_DEQUEUE Vincent Guittot
2024-12-09 11:00   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2024-12-02 17:45 ` [PATCH 03/11 v3] sched/fair: Rename h_nr_running into h_nr_queued Vincent Guittot
2024-12-09 11:00   ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2024-12-02 17:45 ` [PATCH 04/11 v3] sched/fair: Add new cfs_rq.h_nr_runnable Vincent Guittot
2024-12-09 11:00   ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2024-12-02 17:46 ` [PATCH 05/11 v3] sched/fair: Use the " Vincent Guittot
2024-12-09 11:00   ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2024-12-02 17:46 ` [PATCH 06/11 v3] sched/fair: Removed unsued cfs_rq.h_nr_delayed Vincent Guittot
2024-12-09 11:00   ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2024-12-02 17:46 ` [PATCH 07/11 v3] sched/fair: Rename cfs_rq.idle_h_nr_running into h_nr_idle Vincent Guittot
2024-12-09 11:00   ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2024-12-02 17:46 ` [PATCH 08/11 v3] sched/fair: Remove unused cfs_rq.idle_nr_running Vincent Guittot
2024-12-09 11:00   ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2024-12-02 17:46 ` [PATCH 09/11 v3] sched/fair: Rename cfs_rq.nr_running into nr_queued Vincent Guittot
2024-12-09 11:00   ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2024-12-02 17:46 ` [PATCH 10/11 v3] sched/fair: Do not try to migrate delayed dequeue task Vincent Guittot
2024-12-09 11:00   ` tip-bot2 for Vincent Guittot [this message]
2024-12-02 17:46 ` [PATCH 11/11 v3] sched/fair: Fix variable declaration position Vincent Guittot
2024-12-09 11:00   ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2024-12-03 10:41 ` [PATCH 0/11 v3] sched/fair: Fix statistics with delayed dequeue Dietmar Eggemann
2024-12-03 11:18   ` Peter Zijlstra
2024-12-03 13:37     ` Vincent Guittot
2024-12-04 19:10 ` Luis Machado
2024-12-05  7:23   ` 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=173374200362.412.2553443361090747763.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=vincent.guittot@linaro.org \
    --cc=x86@kernel.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