From c4bd5f6e084a6ced2c7a2f76798d0a34947ffeb7 Mon Sep 17 00:00:00 2001 From: Martin Borg Date: Fri, 23 Mar 2018 14:01:03 +0100 Subject: boot_time_opt: update host boot time optimization patches for 4.14 The new patches are based on: https://github.com/clearlinux-pkgs/linux-lts commit 5595fe425a52af6734235a1a953b6b03210060ec Signed-off-by: Martin Borg Signed-off-by: Adrian Dudau --- .../0113-fix-initcall-timestamps.patch | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 patches/boot_time_opt/0113-fix-initcall-timestamps.patch (limited to 'patches/boot_time_opt/0113-fix-initcall-timestamps.patch') diff --git a/patches/boot_time_opt/0113-fix-initcall-timestamps.patch b/patches/boot_time_opt/0113-fix-initcall-timestamps.patch new file mode 100644 index 0000000..724129a --- /dev/null +++ b/patches/boot_time_opt/0113-fix-initcall-timestamps.patch @@ -0,0 +1,42 @@ +From 2d08a233a1dd6eef3979f6d09b03cfcb66db7b0e Mon Sep 17 00:00:00 2001 +From: Arjan van de Ven +Date: Thu, 2 Jun 2016 23:36:32 -0500 +Subject: [PATCH 113/126] fix initcall timestamps + +Print more finegrained initcall timings + +use the tsc instead of the jiffies clock for initcall_debug +--- + init/main.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/init/main.c b/init/main.c +index 7da935ad2d12..d1ba883d3382 100644 +--- a/init/main.c ++++ b/init/main.c +@@ -795,16 +795,16 @@ __setup("initcall_blacklist=", initcall_blacklist); + + static int __init_or_module do_one_initcall_debug(initcall_t fn) + { +- ktime_t calltime, delta, rettime; ++ unsigned long long calltime, delta, rettime; + unsigned long long duration; + int ret; + +- printk(KERN_DEBUG "calling %pF @ %i\n", fn, raw_smp_processor_id()); +- calltime = ktime_get(); ++ printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current)); ++ calltime = local_clock(); + ret = fn(); +- rettime = ktime_get(); +- delta = ktime_sub(rettime, calltime); +- duration = (unsigned long long) ktime_to_ns(delta) >> 10; ++ rettime = local_clock(); ++ delta = rettime - calltime; ++ duration = delta >> 10; + printk(KERN_DEBUG "initcall %pF returned %d after %lld usecs\n", + fn, ret, duration); + +-- +2.15.0 + -- cgit v1.2.3-54-g00ecf