From: Qais Yousef <qyousef@layalina.io>
To: Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: linux-kernel@vger.kernel.org,
"Pierre Gondois" <Pierre.Gondois@arm.com>,
Qais Yousef <qyousef@layalina.io>
Subject: [PATCH v6 0/4] sched: Don't trigger misfit if affinity is restricted
Date: Tue, 20 Feb 2024 22:56:18 +0000 [thread overview]
Message-ID: <20240220225622.2626569-1-qyousef@layalina.io> (raw)
Changes since v5:
* Remove redundant check to rq->rd->max_cpu_capacity
* Simplify check_misfit_status() further by removing unnecessary checks.
* Add new patch to remove no longer used rd->max_cpu_capacity
* Add new patch to prevent misfit lb from polluting balance_interval
and nr_balance_failed
Changes since v4:
* Store max_allowed_capacity in task_struct and populate it when
affinity changes to avoid iterating through the capacities list in the
fast path (Vincent)
* Use rq->rd->max_cpu_capacity which is updated after hotplug
operations to check biggest allowed capacity in the system.
* Undo the change to check_misfit_status() and improve the function to
avoid similar confusion in the future.
* Split the patches differently. Export the capacity list and sort it
is now patch 1, handling of affinity for misfit detection is patch 2.
Changes since v3:
* Update commit message of patch 2 to be less verbose
Changes since v2:
* Convert access of asym_cap_list to be rcu protected
* Add new patch to sort the list in descending order
* Move some declarations inside affinity check block
* Remove now redundant check against max_cpu_capacity in check_misfit_status()
Changes since v1:
* Use asym_cap_list (thanks Dietmar) to iterate instead of iterating
through every cpu which Vincent was concerned about.
* Use uclamped util to compare with capacity instead of util_fits_cpu()
when iterating through capcities (Dietmar).
* Update commit log with test results to better demonstrate the problem
v1 discussion: https://lore.kernel.org/lkml/20230820203429.568884-1-qyousef@layalina.io/
v2 discussion: https://lore.kernel.org/lkml/20231212154056.626978-1-qyousef@layalina.io/
v3 discussion: https://lore.kernel.org/lkml/20231231175218.510721-1-qyousef@layalina.io/
v4 discussion: https://lore.kernel.org/lkml/20240105222014.1025040-1-qyousef@layalina.io/
v5 discussion: https://lore.kernel.org/lkml/20240205021123.2225933-1-qyousef@layalina.io/
I ended up adding the patch to prevent increasing balance_interval to the
series. The other lb issues discussed in v4 are still pending more debugging.
Thanks!
--
Qais Yousef
Qais Yousef (4):
sched/topology: Export asym_capacity_list
sched/fair: Check a task has a fitting cpu when updating misfit
sched/topology: Remove max_cpu_capacity from root_domain
sched/fair: Don't double balance_interval for migrate_misfit
include/linux/sched.h | 1 +
init/init_task.c | 1 +
kernel/sched/fair.c | 90 ++++++++++++++++++++++++++++++++---------
kernel/sched/sched.h | 16 +++++++-
kernel/sched/topology.c | 56 +++++++++++++------------
5 files changed, 113 insertions(+), 51 deletions(-)
--
2.34.1
next reply other threads:[~2024-02-20 22:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 22:56 Qais Yousef [this message]
2024-02-20 22:56 ` [PATCH v6 1/4] sched/topology: Export asym_capacity_list Qais Yousef
2024-02-23 9:30 ` Vincent Guittot
2024-02-20 22:56 ` [PATCH v6 2/4] sched/fair: Check a task has a fitting cpu when updating misfit Qais Yousef
2024-02-23 9:30 ` Vincent Guittot
2024-02-23 13:48 ` [PATCH v7] " Qais Yousef
2024-02-23 13:50 ` [PATCH v6 2/4] " Qais Yousef
2024-02-27 9:42 ` Dietmar Eggemann
2024-03-03 17:44 ` Qais Yousef
2024-03-06 21:47 ` Qais Yousef
2024-03-07 9:14 ` Vincent Guittot
2024-03-07 10:35 ` Qais Yousef
2024-03-07 17:54 ` Dietmar Eggemann
2024-03-21 12:20 ` Qais Yousef
2024-02-20 22:56 ` [PATCH v6 3/4] sched/topology: Remove max_cpu_capacity from root_domain Qais Yousef
2024-02-23 9:31 ` Vincent Guittot
2024-02-20 22:56 ` [PATCH v6 4/4] sched/fair: Don't double balance_interval for migrate_misfit Qais Yousef
2024-02-23 9:32 ` 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=20240220225622.2626569-1-qyousef@layalina.io \
--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;
as well as URLs for NNTP newsgroup(s).