linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] Scan for an idle sibling in a single pass
@ 2021-01-25  8:59 Mel Gorman
  2021-01-25  8:59 ` [PATCH 1/4] sched/fair: Remove SIS_AVG_CPU Mel Gorman
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Mel Gorman @ 2021-01-25  8:59 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar
  Cc: Vincent Guittot, Li Aubrey, Qais Yousef, LKML, Mel Gorman

Changelog since v3
o Drop scanning based on cores, SMT4 results showed problems

Changelog since v2
o Remove unnecessary parameters
o Update nr during scan only when scanning for cpus

Changlog since v1
o Move extern declaration to header for coding style
o Remove unnecessary parameter from __select_idle_cpu

This series of 4 patches reposts three patches from Peter entitled
"select_idle_sibling() wreckage". It only scans the runqueues in a single
pass when searching for an idle sibling.

Three patches from Peter were dropped. The first patch altered how scan
depth was calculated. Scan depth deletion is a random number generator
with two major limitations. The avg_idle time is based on the time
between a CPU going idle and being woken up clamped approximately by
2*sysctl_sched_migration_cost.  This is difficult to compare in a sensible
fashion to avg_scan_cost. The second issue is that only the avg_scan_cost
of scan failures is recorded and it does not decay.  This requires deeper
surgery that would justify a patch on its own although Peter notes that
https://lkml.kernel.org/r/20180530143105.977759909@infradead.org is
potentially useful for an alternative avg_idle metric.

The second patch dropped scanned based on cores instead of CPUs as it
rationalised the difference between core scanning and CPU scanning.
Unfortunately, Vincent reported problems with SMT4 so it's dropped
for now until depth searching can be fixed.

The third patch dropped converted the idle core scan throttling mechanism
to SIS_PROP. While this would unify the throttling of core and CPU
scanning, it was not free of regressions and has_idle_cores is a fairly
effective throttling mechanism with the caveat that it can have a lot of
false positives for workloads like hackbench.

Peter's series tried to solve three problems at once, this subset addresses
one problem.
losses but won more than it lost across a range of workloads and machines.

 kernel/sched/fair.c     | 153 +++++++++++++++++++---------------------
 kernel/sched/features.h |   1 -
 2 files changed, 72 insertions(+), 82 deletions(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH v5 0/4] Scan for an idle sibling in a single pass
@ 2021-01-27 13:51 Mel Gorman
  2021-01-27 13:52 ` [PATCH 4/4] sched/fair: Merge select_idle_core/cpu() Mel Gorman
  0 siblings, 1 reply; 14+ messages in thread
From: Mel Gorman @ 2021-01-27 13:51 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar
  Cc: Vincent Guittot, Li Aubrey, Qais Yousef, LKML, Mel Gorman

Changelog since v4
o Avoid use of intermediate variable during select_idle_cpu

Changelog since v3
o Drop scanning based on cores, SMT4 results showed problems

Changelog since v2
o Remove unnecessary parameters
o Update nr during scan only when scanning for cpus

Changlog since v1
o Move extern declaration to header for coding style
o Remove unnecessary parameter from __select_idle_cpu

This series of 4 patches reposts three patches from Peter entitled
"select_idle_sibling() wreckage". It only scans the runqueues in a single
pass when searching for an idle sibling.

Three patches from Peter were dropped. The first patch altered how scan
depth was calculated. Scan depth deletion is a random number generator
with two major limitations. The avg_idle time is based on the time
between a CPU going idle and being woken up clamped approximately by
2*sysctl_sched_migration_cost.  This is difficult to compare in a sensible
fashion to avg_scan_cost. The second issue is that only the avg_scan_cost
of scan failures is recorded and it does not decay.  This requires deeper
surgery that would justify a patch on its own although Peter notes that
https://lkml.kernel.org/r/20180530143105.977759909@infradead.org is
potentially useful for an alternative avg_idle metric.

The second patch dropped scanned based on cores instead of CPUs as it
rationalised the difference between core scanning and CPU scanning.
Unfortunately, Vincent reported problems with SMT4 so it's dropped
for now until depth searching can be fixed.

The third patch dropped converted the idle core scan throttling mechanism
to SIS_PROP. While this would unify the throttling of core and CPU
scanning, it was not free of regressions and has_idle_cores is a fairly
effective throttling mechanism with the caveat that it can have a lot of
false positives for workloads like hackbench.

Peter's series tried to solve three problems at once, this subset addresses
one problem.

 kernel/sched/fair.c     | 151 +++++++++++++++++++---------------------
 kernel/sched/features.h |   1 -
 2 files changed, 70 insertions(+), 82 deletions(-)

-- 
2.26.2

Mel Gorman (4):
  sched/fair: Remove SIS_AVG_CPU
  sched/fair: Move avg_scan_cost calculations under SIS_PROP
  sched/fair: Remove select_idle_smt()
  sched/fair: Merge select_idle_core/cpu()

 kernel/sched/fair.c     | 151 +++++++++++++++++++---------------------
 kernel/sched/features.h |   1 -
 2 files changed, 70 insertions(+), 82 deletions(-)

-- 
2.26.2


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

end of thread, other threads:[~2021-02-17 13:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-25  8:59 [PATCH v4 0/4] Scan for an idle sibling in a single pass Mel Gorman
2021-01-25  8:59 ` [PATCH 1/4] sched/fair: Remove SIS_AVG_CPU Mel Gorman
2021-01-25  8:59 ` [PATCH 2/4] sched/fair: Move avg_scan_cost calculations under SIS_PROP Mel Gorman
2021-01-27 10:39   ` Vincent Guittot
2021-01-25  8:59 ` [PATCH 3/4] sched/fair: Remove select_idle_smt() Mel Gorman
2021-01-27 10:39   ` Vincent Guittot
2021-02-17 13:17   ` [tip: sched/core] " tip-bot2 for Mel Gorman
2021-01-25  8:59 ` [PATCH 4/4] sched/fair: Merge select_idle_core/cpu() Mel Gorman
2021-01-27 10:43   ` Vincent Guittot
2021-01-27 12:02     ` Mel Gorman
2021-01-27 13:07       ` Vincent Guittot
2021-01-27 13:21         ` Mel Gorman
2021-01-27 13:26           ` Vincent Guittot
2021-01-27 13:51 [PATCH v5 0/4] Scan for an idle sibling in a single pass Mel Gorman
2021-01-27 13:52 ` [PATCH 4/4] sched/fair: Merge select_idle_core/cpu() Mel Gorman

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).