From b1abf1299c2f635db21370f989ac9dc2ecbe4189 Mon Sep 17 00:00:00 2001 From: Martin Borg Date: Wed, 9 May 2018 15:29:03 +0200 Subject: boot_time_opt_guest: update guest boot time optimization patches for 4.14 The new patches are based on: https://github.com/clearlinux-pkgs/linux-kvm commit 5a0a30430116735fecb22b269e4ca10a08147d8d Signed-off-by: Martin Borg Signed-off-by: Adrian Dudau --- .../0107-smpboot-reuse-timer-calibration.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 patches/boot_time_opt_guest/0107-smpboot-reuse-timer-calibration.patch (limited to 'patches/boot_time_opt_guest/0107-smpboot-reuse-timer-calibration.patch') diff --git a/patches/boot_time_opt_guest/0107-smpboot-reuse-timer-calibration.patch b/patches/boot_time_opt_guest/0107-smpboot-reuse-timer-calibration.patch new file mode 100644 index 0000000..23b873f --- /dev/null +++ b/patches/boot_time_opt_guest/0107-smpboot-reuse-timer-calibration.patch @@ -0,0 +1,45 @@ +From 12409839a8fcf30e6b83290f30f1187efe4a58b6 Mon Sep 17 00:00:00 2001 +From: Arjan van de Ven +Date: Wed, 11 Feb 2015 17:28:14 -0600 +Subject: [PATCH 107/114] smpboot: reuse timer calibration + +NO point recalibrating for known-constant tsc... saves 200ms+ of boot time. + +Author: Arjan van de Ven + +Signed-off-by: Miguel Bernal Marin +--- + arch/x86/kernel/smpboot.c | 2 +- + arch/x86/kernel/tsc.c | 3 +++ + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c +index f04479a8f74f..6f41d74350ec 100644 +--- a/arch/x86/kernel/smpboot.c ++++ b/arch/x86/kernel/smpboot.c +@@ -764,7 +764,7 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip) + pr_debug("Waiting for send to finish...\n"); + send_status = safe_apic_wait_icr_idle(); + +- udelay(init_udelay); ++ udelay(100); + + pr_debug("Deasserting INIT\n"); + +diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c +index 714dfba6a1e7..96cddaf0f48b 100644 +--- a/arch/x86/kernel/tsc.c ++++ b/arch/x86/kernel/tsc.c +@@ -1438,6 +1438,9 @@ unsigned long calibrate_delay_is_known(void) + if (!mask) + return 0; + ++ if (cpu !=0) ++ return cpu_data(0).loops_per_jiffy; ++ + sibling = cpumask_any_but(mask, cpu); + if (sibling < nr_cpu_ids) + return cpu_data(sibling).loops_per_jiffy; +-- +2.13.2 + -- cgit v1.2.3-54-g00ecf