All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] sched/fair: Fix starvation caused by task migration
@ 2022-03-25 22:54 Tim Chen
  2022-03-25 22:54 ` [PATCH 1/2] sched/fair: Don't rely on ->exec_start for migration Tim Chen
  2022-03-25 22:54 ` [PATCH 2/2] sched/fair: Simple runqueue order on migrate Tim Chen
  0 siblings, 2 replies; 14+ messages in thread
From: Tim Chen @ 2022-03-25 22:54 UTC (permalink / raw)
  To: Peter Zijlstra, Vincent Guittot, Ingo Molnar, Juri Lelli
  Cc: Tim Chen, Yu Chen, Walter Mack, Mel Gorman, linux-kernel

Walter Mack noticed during stress testing on 2 socket Sapphire Rapids
system, there were anomalies where tasks were starved for more
than 70 secs before getting scheduled.

The stress test scenario is an extreme case where about 50 threads
per CPU are started on each core.  Then each thread hops from
one core to another continuously.

We discussed this issue with Peter Z., who narrowed
things down to problem with vruntime setting of a migrated
task being too out of sync with the tasks on the target run queue.

Peter suggested the following two patches that did fix
the starvation anomalies that Walter saw.

Yu Chen also kicked the patches into our 0-day test infrastructure to
check for regressions.  The performance changes of note are below:

5.15        Throughput    5.15+patchest  Test
	    Changes       
4634070      -7.5%        4285823        stress-ng.sigsuspend.ops_per_sec
  29934     +37.0%          41006        aim7.jobs-per-min

Stress-ng sigsuspend is the worst affected.  But for most workloads,
they are not negatively impacted.  In fact, we saw 37% improvement
in Aim7 due to these patches.

Tim

Peter Zijlstra (1):
  sched/fair: Don't rely on ->exec_start for migration

Peter Zijlstra (Intel) (1):
  sched/fair: Simple runqueue order on migrate

 include/linux/sched.h   |  1 +
 kernel/sched/fair.c     | 37 +++++++++++++++++++++++++++++++++----
 kernel/sched/features.h |  2 ++
 3 files changed, 36 insertions(+), 4 deletions(-)

-- 
2.32.0


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

end of thread, other threads:[~2022-04-01 18:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-25 22:54 [PATCH 0/2] sched/fair: Fix starvation caused by task migration Tim Chen
2022-03-25 22:54 ` [PATCH 1/2] sched/fair: Don't rely on ->exec_start for migration Tim Chen
2022-03-25 22:54 ` [PATCH 2/2] sched/fair: Simple runqueue order on migrate Tim Chen
2022-03-29  9:03   ` Vincent Guittot
2022-03-31 11:47     ` Peter Zijlstra
2022-03-31 12:15       ` Vincent Guittot
2022-03-29 10:09   ` Abel Wu
2022-03-29 14:26     ` Tim Chen
2022-03-30  9:46   ` [sched/fair] ddb3b1126f: hackbench.throughput -25.9% regression kernel test robot
2022-03-30  9:46     ` kernel test robot
2022-03-30 23:48     ` Tim Chen
2022-03-30 23:48       ` Tim Chen
2022-04-01 18:04       ` Chen Yu
2022-04-01 18:04         ` Chen Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.