linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4 v2] sched/fair: Improve fairness between cfs tasks
@ 2020-09-21  7:24 Vincent Guittot
  2020-09-21  7:24 ` [PATCH 1/4 v2] sched/fair: relax constraint on task's load during load balance Vincent Guittot
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Vincent Guittot @ 2020-09-21  7:24 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, dietmar.eggemann, rostedt, bsegall,
	mgorman, linux-kernel
  Cc: valentin.schneider, pauld, hdanton, Vincent Guittot

When the system doesn't have enough cycles for all tasks, the scheduler
must ensure a fair split of those CPUs cycles between CFS tasks. The
fairness of some use cases can't be solved with a static distribution of
the tasks on the system and requires a periodic rebalancing of the system
but this dynamic behavior is not always optimal and the fair distribution
of the CPU's time is not always ensured.

The patchset improves the fairness by decreasing  the constraint for
selecting migratable tasks with the number of failed load balance. This
change enables then to decrease the imbalance threshold because 1st LB
will try to migrate tasks that fully match the imbalance.

Some tests results:

- small 2 x 4 cores arm64 system

hackbench -l (256000/#grp) -g #grp

grp    tip/sched/core         +patchset             improvement
1      1.420(+/- 11.72 %)     1.382(+/-10.50 %)     2.72 %
4      1.295(+/-  2.72 %)     1.218(+/- 2.97 %)     0.76 %
8      1.220(+/-  2.17 %)     1.218(+/- 1.60 %)     0.17 %
16     1.258(+/-  1.88 %)     1.250(+/- 1,78 %)     0.58 %


fairness tests: run always running rt-app threads
monitor the ratio between min/max work done by threads

                  v5.9-rc1             w/ patchset
9 threads  avg     78.3% (+/- 6.60%)   91.20% (+/- 2.44%)
           worst   68.6%               85.67%

11 threads avg     65.91% (+/- 8.26%)  91.34% (+/- 1.87%)
           worst   53.52%              87.26%

- large 2 nodes x 28 cores x 4 threads arm64 system

The hackbench tests that I usually run as well as the sp.C.x and lu.C.x
tests with 224 threads have not shown any difference with a mix of less
than 0.5% of improvements or regressions.

Changes for v2:
- rebased on tip/sched/core
- added comment for patch 3
- added acked and reviewed tags

Vincent Guittot (4):
  sched/fair: relax constraint on task's load during load balance
  sched/fair: reduce minimal imbalance threshold
  sched/fair: minimize concurrent LBs between domain level
  sched/fair: reduce busy load balance interval

 kernel/sched/fair.c     | 13 +++++++++++--
 kernel/sched/topology.c |  4 ++--
 2 files changed, 13 insertions(+), 4 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2020-09-29  7:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21  7:24 [PATCH 0/4 v2] sched/fair: Improve fairness between cfs tasks Vincent Guittot
2020-09-21  7:24 ` [PATCH 1/4 v2] sched/fair: relax constraint on task's load during load balance Vincent Guittot
2020-09-23 14:43   ` Valentin Schneider
2020-09-29  7:56   ` [tip: sched/core] sched/fair: Relax " tip-bot2 for Vincent Guittot
2020-09-21  7:24 ` [PATCH 2/4 v2] sched/fair: reduce minimal imbalance threshold Vincent Guittot
2020-09-23 14:43   ` Valentin Schneider
2020-09-29  7:56   ` [tip: sched/core] sched/fair: Reduce " tip-bot2 for Vincent Guittot
2020-09-21  7:24 ` [PATCH 3/4 v2] sched/fair: minimize concurrent LBs between domain level Vincent Guittot
2020-09-23 14:43   ` Valentin Schneider
2020-09-29  7:56   ` [tip: sched/core] sched/fair: Minimize " tip-bot2 for Vincent Guittot
2020-09-21  7:24 ` [PATCH 4/4 v2] sched/fair: reduce busy load balance interval Vincent Guittot
2020-09-23 14:43   ` Valentin Schneider
2020-09-29  7:56   ` [tip: sched/core] sched/fair: Reduce " tip-bot2 for Vincent Guittot
2020-09-23 15:47 ` [PATCH 0/4 v2] sched/fair: Improve fairness between cfs tasks Mel Gorman

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