public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/1] Reduce cost of accessing tg->load_avg
@ 2023-08-16  2:48 Aaron Lu
  2023-08-16  2:48 ` [RFC PATCH 1/1] sched/fair: ratelimit update to tg->load_avg Aaron Lu
  0 siblings, 1 reply; 7+ messages in thread
From: Aaron Lu @ 2023-08-16  2:48 UTC (permalink / raw)
  To: Peter Zijlstra, Vincent Guittot, Ingo Molnar, Juri Lelli
  Cc: Daniel Jordan, Dietmar Eggemann, Steven Rostedt, Ben Segall,
	Mel Gorman, Daniel Bristot de Oliveira, Valentin Schneider,
	Tim Chen, Nitin Tekchandani, Yu Chen, Waiman Long, Deng Pan,
	Mathieu Desnoyers, linux-kernel

Nitin Tekchandani noticed some scheduler functions have high cost
according to perf/cycles while running postgres_sysbench workload.
I perf/annotated the high cost functions: update_cfs_group() and
update_load_avg() and found the costs were ~90% due to accessing to
tg->load_avg. This series is an attempt to reduce the overhead of
the two functions.

Thanks to Vincent's suggestion from v1, this revision used a simpler way
to solve the overhead problem by limiting updates to tg->load_avg to at
most once per ms. Benchmark shows that it has good results and with the
rate limit in place, other optimizations in v1 don't improve performance
further so they are dropped from this revision.

Aaron Lu (1):
  sched/fair: ratelimit update to tg->load_avg

 kernel/sched/fair.c  | 13 ++++++++++++-
 kernel/sched/sched.h |  1 +
 2 files changed, 13 insertions(+), 1 deletion(-)

-- 
2.41.0


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

end of thread, other threads:[~2023-08-21 11:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-16  2:48 [RFC PATCH v2 0/1] Reduce cost of accessing tg->load_avg Aaron Lu
2023-08-16  2:48 ` [RFC PATCH 1/1] sched/fair: ratelimit update to tg->load_avg Aaron Lu
2023-08-16  4:42   ` Gautham R. Shenoy
2023-08-16  5:55     ` Aaron Lu
2023-08-17 12:56   ` Vincent Guittot
2023-08-21  6:06     ` Aaron Lu
2023-08-21 11:57       ` Vincent Guittot

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