diff options
author | Ingo Molnar <mingo@kernel.org> | 2022-02-22 14:51:58 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2022-02-23 10:58:34 +0100 |
commit | 4ff8f2ca6ccd9e0cc5665d09f86d631b3ae3a14c (patch) | |
tree | 3a136a14e77fbc0748404b54a310351ee7980668 /kernel/sched/build_utility.c | |
parent | sched/headers: Reorganize, clean up and optimize kernel/sched/build_utility.c... (diff) | |
download | linux-4ff8f2ca6ccd9e0cc5665d09f86d631b3ae3a14c.tar.xz linux-4ff8f2ca6ccd9e0cc5665d09f86d631b3ae3a14c.zip |
sched/headers: Reorganize, clean up and optimize kernel/sched/sched.h dependencies
Remove all headers, except the ones required to make this header
build standalone.
Also include stats.h in sched.h explicitly - dependencies already
require this.
Summary of the build speedup gained through the last ~15 scheduler build &
header dependency patches:
Cumulative scheduler (kernel/sched/) build time speedup on a
Linux distribution's config, which enables all scheduler features,
compared to the vanilla kernel:
_____________________________________________________________________________
|
| Vanilla kernel (v5.13-rc7):
|_____________________________________________________________________________
|
| Performance counter stats for 'make -j96 kernel/sched/' (3 runs):
|
| 126,975,564,374 instructions # 1.45 insn per cycle ( +- 0.00% )
| 87,637,847,671 cycles # 3.959 GHz ( +- 0.30% )
| 22,136.96 msec cpu-clock # 7.499 CPUs utilized ( +- 0.29% )
|
| 2.9520 +- 0.0169 seconds time elapsed ( +- 0.57% )
|_____________________________________________________________________________
|
| Patched kernel:
|_____________________________________________________________________________
|
| Performance counter stats for 'make -j96 kernel/sched/' (3 runs):
|
| 50,420,496,914 instructions # 1.47 insn per cycle ( +- 0.00% )
| 34,234,322,038 cycles # 3.946 GHz ( +- 0.31% )
| 8,675.81 msec cpu-clock # 3.053 CPUs utilized ( +- 0.45% )
|
| 2.8420 +- 0.0181 seconds time elapsed ( +- 0.64% )
|_____________________________________________________________________________
Summary:
- CPU time used to build the scheduler dropped by -60.9%, a reduction
from 22.1 clock-seconds to 8.7 clock-seconds.
- Wall-clock time to build the scheduler dropped by -3.9%, a reduction
from 2.95 seconds to 2.84 seconds.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'kernel/sched/build_utility.c')
-rw-r--r-- | kernel/sched/build_utility.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/sched/build_utility.c b/kernel/sched/build_utility.c index bc2f4d648209..eec0849b2aae 100644 --- a/kernel/sched/build_utility.c +++ b/kernel/sched/build_utility.c @@ -44,13 +44,11 @@ #include <linux/wait_api.h> #include <linux/workqueue_api.h> -#ifdef CONFIG_PARAVIRT -# include <asm/paravirt.h> -#endif - #include <uapi/linux/prctl.h> #include <uapi/linux/sched/types.h> +#include <asm/switch_to.h> + #include "sched.h" #include "sched-pelt.h" #include "stats.h" |