[PATCH 1/2] sched/fair: completely remove update_cfs_group() in dequeue path

From: Aaron Lu
Date: Wed Jul 19 2023 - 02:51:07 EST


---
kernel/sched/fair.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 2adb6a6abbce..a21ab72819ce 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6434,7 +6434,6 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags)

update_load_avg(cfs_rq, se, UPDATE_TG);
se_update_runnable(se);
- update_cfs_group(se);

cfs_rq->h_nr_running--;
cfs_rq->idle_h_nr_running -= idle_h_nr_running;
--
2.40.1

Than P95 latency of the schbench workload I described in patch4's
changelog will increase to > 1ms(base and patch4's P95 < 100us):

Latency percentiles (usec) runtime 300 (s) (18504 total samples)
50.0th: 20 (9537 samples)
75.0th: 25 (4869 samples)
90.0th: 29 (2264 samples)
95.0th: 2564 (909 samples)
*99.0th: 20768 (740 samples)
99.5th: 23520 (93 samples)
99.9th: 31520 (74 samples)
min=6, max=40072

If I further remove update_cfs_group() completely in enqueue path on top
of the last change: