public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/10] sched/fair: Avoid unnecessary migrations within SMT domains
@ 2023-02-07  4:58 Ricardo Neri
  2023-02-07  4:58 ` [PATCH v3 01/10] sched/fair: Generalize asym_packing logic for SMT cores Ricardo Neri
                   ` (10 more replies)
  0 siblings, 11 replies; 49+ messages in thread
From: Ricardo Neri @ 2023-02-07  4:58 UTC (permalink / raw)
  To: Peter Zijlstra (Intel), Juri Lelli, Vincent Guittot
  Cc: Ricardo Neri, Ravi V. Shankar, Ben Segall,
	Daniel Bristot de Oliveira, Dietmar Eggemann, Len Brown,
	Mel Gorman, Rafael J. Wysocki, Srinivas Pandruvada,
	Steven Rostedt, Tim Chen, Valentin Schneider, Ionela Voinescu,
	x86, linux-kernel, Ricardo Neri

Hi,

This is v3 of this series. Previous versions can be found here [1] and
here [2]. To avoid duplication, I do not include the cover letter of the
original submission. You can read it in [1].

Changes since v2:

Vincent correctly indicated that I was abusing asym_packing to force load
balances unrelated to CPU priority. The underlying issue is that the
scheduler cannot not handle load balances between SMT and non-SMT cores
correctly. I added several prework patches to fix it... and I removed the
abuse of asym_packing.

Dietmar helped me to realize that there is a better way to check the idle
state of SMT cores. Now I give the task to the scheduler instead of
architecture-specific overrides. I unconditionally obey CPU priorities
at the SMT level. This keeps Power7 happy. At upper levels (i.e., when
balancing load between cores) the scheduler also considers the idle state
of the core in addition to CPU priority. This satisfies x86.

Ionela spotted a violation of the scheduler topology sanity checks. We did
not find a check that suits both Power7 and x86. For now, I removed the
NEEDS_CHILD flag of SD_ASYM_PACKING.

Hopefully, these patches are in sufficiently good shape to be merged.

Thank you for your feedback and I look forward to getting more of it!

New patches 2, 3, 4, 5, 6, 7, 8
Updated patches: 1
Unchanged patches: 9, 10

BR,
Ricardo

[1]. https://lore.kernel.org/lkml/20220825225529.26465-1-ricardo.neri-calderon@linux.intel.com/
[2]. https://lore.kernel.org/lkml/20221122203532.15013-1-ricardo.neri-calderon@linux.intel.com/


Ricardo Neri (10):
  sched/fair: Generalize asym_packing logic for SMT cores
  sched/fair: Move is_core_idle() out of CONFIG_NUMA
  sched/fair: Only do asym_packing load balancing from fully idle SMT
    cores
  sched/fair: Let low-priority cores help high-priority busy SMT cores
  sched/fair: Keep a fully_busy SMT sched group as busiest
  sched/fair: Use the prefer_sibling flag of the current sched domain
  sched/fair: Do not even the number of busy CPUs via asym_packing
  sched/topology: Remove SHARED_CHILD from ASYM_PACKING
  x86/sched: Remove SD_ASYM_PACKING from the SMT domain flags
  x86/sched/itmt: Give all SMT siblings of a core the same priority

 arch/x86/kernel/itmt.c         |  23 +----
 arch/x86/kernel/smpboot.c      |   2 +-
 include/linux/sched/sd_flags.h |   5 +-
 kernel/sched/fair.c            | 175 +++++++++++++++++----------------
 4 files changed, 99 insertions(+), 106 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2023-03-14 23:44 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-07  4:58 [PATCH v3 00/10] sched/fair: Avoid unnecessary migrations within SMT domains Ricardo Neri
2023-02-07  4:58 ` [PATCH v3 01/10] sched/fair: Generalize asym_packing logic for SMT cores Ricardo Neri
2023-02-07  4:58 ` [PATCH v3 02/10] sched/fair: Move is_core_idle() out of CONFIG_NUMA Ricardo Neri
2023-02-07  4:58 ` [PATCH v3 03/10] sched/fair: Only do asym_packing load balancing from fully idle SMT cores Ricardo Neri
2023-02-07  4:58 ` [PATCH v3 04/10] sched/fair: Let low-priority cores help high-priority busy " Ricardo Neri
2023-02-08  7:56   ` Vincent Guittot
2023-02-09 11:53     ` Peter Zijlstra
2023-02-10  0:43       ` Ricardo Neri
2023-02-10  8:41         ` Peter Zijlstra
2023-02-10 13:05           ` Ricardo Neri
2023-02-10  1:52     ` Ricardo Neri
2023-02-13 13:40   ` Dietmar Eggemann
2023-02-13 23:23     ` Ricardo Neri
2023-03-10  0:51   ` Tim Chen
2023-03-14 23:54     ` Ricardo Neri
2023-02-07  4:58 ` [PATCH v3 05/10] sched/fair: Keep a fully_busy SMT sched group as busiest Ricardo Neri
2023-02-07  4:58 ` [PATCH v3 06/10] sched/fair: Use the prefer_sibling flag of the current sched domain Ricardo Neri
2023-02-08  7:48   ` Vincent Guittot
2023-02-10 13:24     ` Ricardo Neri
2023-02-09 13:17   ` Chen Yu
2023-02-09 20:00     ` Chen, Tim C
2023-02-09 23:05       ` Tim Chen
2023-02-10  3:16         ` Ricardo Neri
2023-02-10  6:55         ` Chen Yu
2023-02-10 10:08   ` Peter Zijlstra
2023-02-10 14:54     ` Valentin Schneider
2023-02-10 16:53       ` Peter Zijlstra
2023-02-10 17:12         ` Valentin Schneider
2023-02-10 18:31           ` Ricardo Neri
2023-02-13 12:17             ` Dietmar Eggemann
2023-02-14  6:43               ` Ricardo Neri
2023-02-16  5:21                 ` Ricardo Neri
2023-02-16 12:16                   ` Peter Zijlstra
2023-02-17  1:41                     ` Ricardo Neri
2023-02-23 10:09                   ` Dietmar Eggemann
2023-02-24 12:29                     ` Ricardo Neri
     [not found]         ` <tencent_60A804570F09C0CFE0495D5B984941123A05@qq.com>
2023-02-20  9:45           ` Valentin Schneider
     [not found]             ` <tencent_6C38D389245FD03C6E1312999FEDD394F606@qq.com>
2023-02-21 18:15               ` Valentin Schneider
2023-02-07  4:58 ` [PATCH v3 07/10] sched/fair: Do not even the number of busy CPUs via asym_packing Ricardo Neri
2023-02-13 12:44   ` Dietmar Eggemann
2023-02-13 19:47     ` Ricardo Neri
2023-02-07  4:58 ` [PATCH v3 08/10] sched/topology: Remove SHARED_CHILD from ASYM_PACKING Ricardo Neri
2023-03-03 11:29   ` Ionela Voinescu
2023-03-05 19:08     ` Ricardo Neri
2023-03-06 13:10       ` Ionela Voinescu
2023-03-06 18:17         ` Ricardo Neri
2023-02-07  4:58 ` [PATCH v3 09/10] x86/sched: Remove SD_ASYM_PACKING from the SMT domain flags Ricardo Neri
2023-02-07  4:58 ` [PATCH v3 10/10] x86/sched/itmt: Give all SMT siblings of a core the same priority Ricardo Neri
2023-02-09  8:07 ` [PATCH v3 00/10] sched/fair: Avoid unnecessary migrations within SMT domains Zhang, Rui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox