mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Qais Yousef <qyousef@layalina.io>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	linux-kernel@vger.kernel.org,
	Pierre Gondois <Pierre.Gondois@arm.com>
Subject: Re: [PATCH v5 2/2] sched/fair: Check a task has a fitting cpu when updating misfit
Date: Tue, 20 Feb 2024 16:15:46 +0000	[thread overview]
Message-ID: <20240220161546.7r3leteuqygf6jxc@airbuntu> (raw)
In-Reply-To: <20240220155913.n7uxb3e56kuhcxs2@airbuntu>

On 02/20/24 15:59, Qais Yousef wrote:

> I realized that I wanted to also add a new patch to not double balance_interval
> for misfit failures. I think you indicated that seems the right thing to do?

I think this should do it?

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 70ffbb1aa15c..b12b7de495d0 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -11552,8 +11552,13 @@ static int load_balance(int this_cpu, struct rq *this_rq,
         * repeatedly reach this code, which would lead to balance_interval
         * skyrocketing in a short amount of time. Skip the balance_interval
         * increase logic to avoid that.
+        *
+        * Similarly misfit migration which is not necessarily an indication of
+        * the system being busy and requires lb to backoff to let it settle
+        * down.
         */
-       if (env.idle == CPU_NEWLY_IDLE)
+       if (env.idle == CPU_NEWLY_IDLE ||
+           env.migration_type == migrate_misfit)
                goto out;

        /* tune up the balancing interval */

  reply	other threads:[~2024-02-20 16:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05  2:11 [PATCH v5 0/2] sched: Don't trigger misfit if affinity is restricted Qais Yousef
2024-02-05  2:11 ` [PATCH v5 1/2] sched/topology: Export asym_capacity_list Qais Yousef
2024-02-05  2:11 ` [PATCH v5 2/2] sched/fair: Check a task has a fitting cpu when updating misfit Qais Yousef
2024-02-06 10:55   ` Hillf Danton
2024-02-06 15:24     ` Qais Yousef
2024-02-12 17:27   ` Vincent Guittot
2024-02-20 15:59     ` Qais Yousef
2024-02-20 16:15       ` Qais Yousef [this message]
2024-02-20 17:37         ` 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=20240220161546.7r3leteuqygf6jxc@airbuntu \
    --to=qyousef@layalina.io \
    --cc=Pierre.Gondois@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=vincent.guittot@linaro.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

all inboxes | Powered by JetHome®