2022-03-31 03:41:31

by Tim Chen

[permalink] [raw]
Subject: Re: [sched/fair] ddb3b1126f: hackbench.throughput -25.9% regression

On Wed, 2022-03-30 at 17:46 +0800, kernel test robot wrote:
>
> Greeting,
>
> FYI, we noticed a -25.9% regression of hackbench.throughput due to commit:
>

Will try to check the regression seen.

Thanks.

Tim

>
>
> commit:
> d9ad181b93 ("sched/fair: Don't rely on ->exec_start for migration")
> ddb3b1126f ("sched/fair: Simple runqueue order on migrate")
>
> d9ad181b93f83b36 ddb3b1126fe93e8d6e059600488
> ---------------- ---------------------------
> %stddev %change %stddev
> \ | \
> 92566 -25.9% 68598 ± 2% hackbench.throughput
> 85.50 +40.8% 120.35 ± 2% hackbench.time.elapsed_time
> 85.50 +40.8% 120.35 ± 2% hackbench.time.elapsed_time.max
> 9674391 ± 2% +466.2% 54780205 ± 2% hackbench.time.involuntary_context_switches
> 1240 +42.6% 1768 ± 3% hackbench.time.system_time
> 89.58 +20.4% 107.85 hackbench.time.user_time
> 36626407 +270.2% 1.356e+08 ± 2% hackbench.time.voluntary_context_switches
> 2500490 ± 3% +78.2% 4456808 ± 3% cpuidle..usage
> 118.45 ± 2% +29.2% 153.02 ± 2% uptime.boot
>


2022-04-03 14:01:32

by Yu Chen

[permalink] [raw]
Subject: Re: [sched/fair] ddb3b1126f: hackbench.throughput -25.9% regression

On Thu, Mar 31, 2022 at 11:42 AM Tim Chen <[email protected]> wrote:
>
> On Wed, 2022-03-30 at 17:46 +0800, kernel test robot wrote:
> >
> > Greeting,
> >
> > FYI, we noticed a -25.9% regression of hackbench.throughput due to commit:
> >
>
> Will try to check the regression seen.
>
Double check that the regression could be reproduced on top of the
latest sched/core branch:
parent ("sched/fair: Don't rely on ->exec_start for migration")
fbc ("sched/fair: Simple runqueue order on migrate")

parent fbc
91107 -40.8% 53897 hackbench.throughput

and it is consistent with lkp's original report that the context
switch count is much higher with patch applied:
9591919 +510.3% 58534937
hackbench.time.involuntary_context_switches
36451523 +281.5% 1.391e+08
hackbench.time.voluntary_context_switches

Considering that this patch 'raises' the priority of the migrated
task, by giving it the cfs_rq->min_vruntime,
it is possible that the migrated task would preempt the current
running task more easily.

0.00 +12.2 12.21
perf-profile.calltrace.cycles-pp.enqueue_entity.enqueue_task_fair.ttwu_do_activate.try_to_wake_up.autoremove_wake_function
and the patched version has spent more time on enqueue_entity(),
which might be caused by setting sched entity hierarchy from leaf to
root,
which was mentioned in another thread.

--
Thanks,
Chenyu