From 16b0e3313f53566481c106ace9992e477f8efe9b Mon Sep 17 00:00:00 2001 From: Adrian Calianu Date: Mon, 22 May 2017 08:43:50 +0200 Subject: patches: Boot time optimizations with ClearLinux patches Signed-off-by: Adrian Calianu Signed-off-by: Adrian Dudau --- ...dd-printk-s-to-measure-boot-time-in-more-.patch | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 patches/boot_time_opt/0114-bootstats-add-printk-s-to-measure-boot-time-in-more-.patch (limited to 'patches/boot_time_opt/0114-bootstats-add-printk-s-to-measure-boot-time-in-more-.patch') diff --git a/patches/boot_time_opt/0114-bootstats-add-printk-s-to-measure-boot-time-in-more-.patch b/patches/boot_time_opt/0114-bootstats-add-printk-s-to-measure-boot-time-in-more-.patch new file mode 100644 index 0000000..c6bf036 --- /dev/null +++ b/patches/boot_time_opt/0114-bootstats-add-printk-s-to-measure-boot-time-in-more-.patch @@ -0,0 +1,83 @@ +From 3a1512b4ed3922f88936b95731aaff706e7286a9 Mon Sep 17 00:00:00 2001 +From: Arjan van de Ven +Date: Wed, 11 Feb 2015 16:05:23 -0600 +Subject: [PATCH 114/124] bootstats: add printk's to measure boot time in more + detail + +Few distro-tweaks to add printk's to visualize boot time better + +Author: Arjan van de Ven + +Signed-off-by: Miguel Bernal Marin +--- + arch/x86/kernel/alternative.c | 4 ++++ + drivers/base/firmware_class.c | 2 ++ + init/main.c | 2 +- + kernel/kmod.c | 2 ++ + 4 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c +index 5cb272a7a5a3..d28fb7aae4ce 100644 +--- a/arch/x86/kernel/alternative.c ++++ b/arch/x86/kernel/alternative.c +@@ -626,7 +626,9 @@ void __init alternative_instructions(void) + * patching. + */ + ++ printk("clr: Applying alternatives\n"); + apply_alternatives(__alt_instructions, __alt_instructions_end); ++ printk("clr: Applying alternatives done\n"); + + #ifdef CONFIG_SMP + /* Patch to UP if other cpus not imminent. */ +@@ -637,6 +639,8 @@ void __init alternative_instructions(void) + _text, _etext); + } + ++ printk("clr: Applying alternatives smp done\n"); ++ + if (!uniproc_patched || num_possible_cpus() == 1) + free_init_pages("SMP alternatives", + (unsigned long)__smp_locks, +diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c +index a95e1e572697..b29467031be6 100644 +--- a/drivers/base/firmware_class.c ++++ b/drivers/base/firmware_class.c +@@ -1224,6 +1224,8 @@ request_firmware(const struct firmware **firmware_p, const char *name, + { + int ret; + ++ printk("clr: request_firmware: %s\n", name); ++ + /* Need to pin this module until return */ + __module_get(THIS_MODULE); + ret = _request_firmware(firmware_p, name, device, NULL, 0, +diff --git a/init/main.c b/init/main.c +index 2858be732f6d..f1d8c3fdbf05 100644 +--- a/init/main.c ++++ b/init/main.c +@@ -751,7 +751,7 @@ static int __init_or_module do_one_initcall_debug(initcall_t fn) + unsigned long long duration; + int ret; + +- printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current)); ++ printk(KERN_DEBUG "calling %pF @ %i\n", fn, raw_smp_processor_id()); + calltime = ktime_get(); + ret = fn(); + rettime = ktime_get(); +diff --git a/kernel/kmod.c b/kernel/kmod.c +index 0277d1216f80..dc5a6edd3895 100644 +--- a/kernel/kmod.c ++++ b/kernel/kmod.c +@@ -76,6 +76,8 @@ static int call_modprobe(char *module_name, int wait) + NULL + }; + ++ printk("clr: call_modprobe: %s %i \n", module_name, wait); ++ + char **argv = kmalloc(sizeof(char *[5]), GFP_KERNEL); + if (!argv) + goto out; +-- +2.11.1 + -- cgit v1.2.3-54-g00ecf