public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Reduce cost of accessing tg->load_avg
@ 2023-08-23  6:08 Aaron Lu
  2023-08-23  6:08 ` [PATCH 1/1] sched/fair: ratelimit update to tg->load_avg Aaron Lu
  2023-08-25 10:33 ` [PATCH 0/1] Reduce cost of accessing tg->load_avg Swapnil Sapkal
  0 siblings, 2 replies; 15+ messages in thread
From: Aaron Lu @ 2023-08-23  6:08 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, Gautham R . Shenoy, David Vernet, linux-kernel

RFC v2 -> v1:
- drop RFC;
- move cfs_rq->last_update_tg_load_avg before cfs_rq->tg_load_avg_contrib;
- add Vincent's reviewed-by tag.

RFC v2:
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] 15+ messages in thread

end of thread, other threads:[~2023-09-06  3:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-23  6:08 [PATCH 0/1] Reduce cost of accessing tg->load_avg Aaron Lu
2023-08-23  6:08 ` [PATCH 1/1] sched/fair: ratelimit update to tg->load_avg Aaron Lu
2023-08-23 14:05   ` Mathieu Desnoyers
2023-08-23 14:17     ` Mathieu Desnoyers
2023-08-24  8:01     ` Aaron Lu
2023-08-24 12:56       ` Mathieu Desnoyers
2023-08-24 13:03         ` Vincent Guittot
2023-08-24 13:08           ` Mathieu Desnoyers
2023-08-24 13:24             ` Vincent Guittot
2023-08-25  6:08             ` Aaron Lu
2023-08-24 18:48   ` David Vernet
2023-08-25  6:18     ` Aaron Lu
2023-09-06  3:52   ` kernel test robot
2023-08-25 10:33 ` [PATCH 0/1] Reduce cost of accessing tg->load_avg Swapnil Sapkal
2023-08-28 11:22   ` Aaron Lu

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