summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt/0113-fix-initcall-timestamps.patch
diff options
context:
space:
mode:
authorMartin Borg <martin.borg@enea.com>2018-03-23 14:01:03 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2018-03-26 09:57:31 +0200
commitc4bd5f6e084a6ced2c7a2f76798d0a34947ffeb7 (patch)
treee46d5f9bceca1947817b7739d366aa44faea9be1 /patches/boot_time_opt/0113-fix-initcall-timestamps.patch
parentdfc8946f58bbf4aa3a345c4fb5d5895502936edd (diff)
downloadenea-kernel-cache-c4bd5f6e084a6ced2c7a2f76798d0a34947ffeb7.tar.gz
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 <martin.borg@enea.com> Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'patches/boot_time_opt/0113-fix-initcall-timestamps.patch')
-rw-r--r--patches/boot_time_opt/0113-fix-initcall-timestamps.patch42
1 files changed, 42 insertions, 0 deletions
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 @@
1From 2d08a233a1dd6eef3979f6d09b03cfcb66db7b0e Mon Sep 17 00:00:00 2001
2From: Arjan van de Ven <arjan@linux.intel.com>
3Date: Thu, 2 Jun 2016 23:36:32 -0500
4Subject: [PATCH 113/126] fix initcall timestamps
5
6Print more finegrained initcall timings
7
8use the tsc instead of the jiffies clock for initcall_debug
9---
10 init/main.c | 12 ++++++------
11 1 file changed, 6 insertions(+), 6 deletions(-)
12
13diff --git a/init/main.c b/init/main.c
14index 7da935ad2d12..d1ba883d3382 100644
15--- a/init/main.c
16+++ b/init/main.c
17@@ -795,16 +795,16 @@ __setup("initcall_blacklist=", initcall_blacklist);
18
19 static int __init_or_module do_one_initcall_debug(initcall_t fn)
20 {
21- ktime_t calltime, delta, rettime;
22+ unsigned long long calltime, delta, rettime;
23 unsigned long long duration;
24 int ret;
25
26- printk(KERN_DEBUG "calling %pF @ %i\n", fn, raw_smp_processor_id());
27- calltime = ktime_get();
28+ printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current));
29+ calltime = local_clock();
30 ret = fn();
31- rettime = ktime_get();
32- delta = ktime_sub(rettime, calltime);
33- duration = (unsigned long long) ktime_to_ns(delta) >> 10;
34+ rettime = local_clock();
35+ delta = rettime - calltime;
36+ duration = delta >> 10;
37 printk(KERN_DEBUG "initcall %pF returned %d after %lld usecs\n",
38 fn, ret, duration);
39
40--
412.15.0
42