mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Fix a couple of corner cases in feec() when using uclamp_max
@ 2023-07-17 21:57 Qais Yousef
  2023-07-17 21:57 ` [PATCH v3 1/3] sched/uclamp: Set max_spare_cap_cpu even if max_spare_cap is 0 Qais Yousef
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Qais Yousef @ 2023-07-17 21:57 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Vincent Guittot, Dietmar Eggemann
  Cc: linux-kernel, Lukasz Luba, Wei Wang, Xuewen Yan, Hank,
	Jonathan JMChen, Hongyan Xia, Qais Yousef

Changes in v3:

	* Fix sign comparison problem in patch 1 (Thanks Vincent!)
	* Simplify comparison and remove function in patch 2 (Thanks Dietmar!)

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/
v2 link: https://lore.kernel.org/lkml/20230205224318.2035646-1-qyousef@layalina.io/

In v2 Dietmar has raised concerns about limitation in current EM calculations
that can end up packing more tasks on a cluster. While this is not ideal
situation and we need to fix it, but it is another independent problem that is
not introduced by this fix. I don't see a reason why we should couple them
rather than work on each problem independently. The packing behavior in
practice is actually not bad as if something is capped really hard, there's
a desire to keep them on this less performant clusters.

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 analyzing these two problems. It's generally useful to trace down
task placement decision based on EAS.

This is based on tip/sched/core.

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          | 36 ++++++++++++------------------------
 3 files changed, 17 insertions(+), 24 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-08-22  7:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17 21:57 [PATCH v3 0/3] Fix a couple of corner cases in feec() when using uclamp_max Qais Yousef
2023-07-17 21:57 ` [PATCH v3 1/3] sched/uclamp: Set max_spare_cap_cpu even if max_spare_cap is 0 Qais Yousef
2023-07-21  9:56   ` Vincent Guittot
2023-07-17 21:57 ` [PATCH v3 2/3] sched/uclamp: Ignore (util == 0) optimization in feec() when p_util_max = 0 Qais Yousef
2023-07-21  9:57   ` Vincent Guittot
2023-08-20 13:52     ` Qais Yousef
2023-07-17 21:57 ` [PATCH v3 3/3] sched/tp: Add new tracepoint to track compute energy computation Qais Yousef
2023-08-21  9:04   ` Lukasz Luba
2023-08-21 22:36     ` Qais Yousef
2023-08-22  7:43       ` Lukasz Luba

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®