diff options
Diffstat (limited to 'patches/boot_time_opt/0108-smpboot-reuse-timer-calibration.patch')
| -rw-r--r-- | patches/boot_time_opt/0108-smpboot-reuse-timer-calibration.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/patches/boot_time_opt/0108-smpboot-reuse-timer-calibration.patch b/patches/boot_time_opt/0108-smpboot-reuse-timer-calibration.patch new file mode 100644 index 0000000..7dd298e --- /dev/null +++ b/patches/boot_time_opt/0108-smpboot-reuse-timer-calibration.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
| 3 | Date: Wed, 11 Feb 2015 17:28:14 -0600 | ||
| 4 | Subject: [PATCH] smpboot: reuse timer calibration | ||
| 5 | |||
| 6 | NO point recalibrating for known-constant tsc ... | ||
| 7 | saves 200ms+ of boot time. | ||
| 8 | --- | ||
| 9 | arch/x86/kernel/tsc.c | 3 +++ | ||
| 10 | 1 file changed, 3 insertions(+) | ||
| 11 | |||
| 12 | diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c | ||
| 13 | index f70dffc2771f..dfb9f60554af 100644 | ||
| 14 | --- a/arch/x86/kernel/tsc.c | ||
| 15 | +++ b/arch/x86/kernel/tsc.c | ||
| 16 | @@ -1546,6 +1546,9 @@ unsigned long calibrate_delay_is_known(void) | ||
| 17 | if (!constant_tsc || !mask) | ||
| 18 | return 0; | ||
| 19 | |||
| 20 | + if (cpu != 0) | ||
| 21 | + return cpu_data(0).loops_per_jiffy; | ||
| 22 | + | ||
| 23 | sibling = cpumask_any_but(mask, cpu); | ||
| 24 | if (sibling < nr_cpu_ids) | ||
| 25 | return cpu_data(sibling).loops_per_jiffy; | ||
| 26 | -- | ||
| 27 | https://clearlinux.org | ||
| 28 | |||
