[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230205224318.2035646-1-qyousef@layalina.io>
Date: Sun, 5 Feb 2023 22:43:15 +0000
From: Qais Yousef <qyousef@...alina.io>
To: Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>
Cc: linux-kernel@...r.kernel.org, Lukasz Luba <lukasz.luba@....com>,
Wei Wang <wvw@...gle.com>, Xuewen Yan <xuewen.yan94@...il.com>,
Hank <han.lin@...iatek.com>,
Jonathan JMChen <Jonathan.JMChen@...iatek.com>,
Qais Yousef <qyousef@...alina.io>
Subject: [PATCH v2 0/3] Fix a couple of corner cases in feec() when using uclamp_max
Changes in v2:
* Use long instead of unsigned long to keep the comparison simple
in spite of being inconsistent with how capacity type.
* Fix missing termination parenthesis that caused build error.
* Rebase on latest tip/sched/core and Vincent v5 of Unlink misift patch.
v1 link: https://lore.kernel.org/lkml/20230129161444.1674958-1-qyousef@layalina.io/
Patch 1 addresses a bug because forcing a task on a small CPU to honour
uclamp_max hint means we can end up with spare_capacity = 0; but the logic is
constructed such that spare_capacity = 0 leads to ignoring this CPU as
a candidate to compute_energy().
Patch 2 addresses a bug due to an optimization in feec() that could lead to
ignoring tasks whose uclamp_max = 0 but task_util(0) != 0.
Patch 3 adds a new tracepoint in compute_energy() as it was helpful in
debugging these two problems.
This is based on tip/sched/core + Vincent's v5 of
Unlink util_fits_cpu()... patch [1]
[1] https://lore.kernel.org/lkml/20230201143628.270912-1-vincent.guittot@linaro.org/
Qais Yousef (3):
sched/uclamp: Set max_spare_cap_cpu even if max_spare_cap is 0
sched/uclamp: Ignore (util == 0) optimization in feec() when
p_util_max = 0
sched/tp: Add new tracepoint to track compute energy computation
include/trace/events/sched.h | 4 ++++
kernel/sched/core.c | 1 +
kernel/sched/fair.c | 18 +++++++++++-------
3 files changed, 16 insertions(+), 7 deletions(-)
--
2.25.1
Powered by blists - more mailing lists