Re: [tip:sched/core] [sched/fair] d329605287: stress-ng.resched.ops_per_sec -24.0% regression

From: Peter Zijlstra
Date: Wed Jul 10 2024 - 08:01:12 EST


On Wed, Jul 10, 2024 at 12:51:44PM +0800, kernel test robot wrote:
>
>
> Hello,
>
> kernel test robot noticed a -24.0% regression of stress-ng.resched.ops_per_sec on:
>
>
> commit: d329605287020c3d1c3b0dadc63d8208e7251382 ("sched/fair: set_load_weight() must also call reweight_task() for SCHED_IDLE tasks")
> https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git sched/core
>
> testcase: stress-ng
> test machine: 64 threads 2 sockets Intel(R) Xeon(R) Gold 6346 CPU @ 3.10GHz (Ice Lake) with 256G memory
> parameters:
>
> nr_threads: 100%
> testtime: 60s
> test: resched
> cpufreq_governor: performance

Well.... if I read the test source correctly, this seems to test how
fast it can call sched_setscheduler(), rather than test how fast we can
schedule.

And that patch mentioned above makes setting SCHED_IDLE more expensve --
as expensive as SCHED_OTHER and SCHED_BATCH.

I'm thinking this test is rather stupid and doesn't actually measure
anything useful, I don't think I consider sched_setscheduler() a fast
path by any means.

Su yeah, *shrug*.