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 --- .../boot_time_opt/0113-overload-on-wakeup.patch | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 patches/boot_time_opt/0113-overload-on-wakeup.patch (limited to 'patches/boot_time_opt/0113-overload-on-wakeup.patch') diff --git a/patches/boot_time_opt/0113-overload-on-wakeup.patch b/patches/boot_time_opt/0113-overload-on-wakeup.patch new file mode 100644 index 0000000..a3a6bce --- /dev/null +++ b/patches/boot_time_opt/0113-overload-on-wakeup.patch @@ -0,0 +1,43 @@ +From 9f25d18f45a8391488feb9783404f2f79b7090f4 Mon Sep 17 00:00:00 2001 +From: jplozi +Date: Fri, 11 Mar 2016 15:18:06 +0100 +Subject: [PATCH 113/124] overload on wakeup + +source https://github.com/jplozi/wastedcores + +as an experiment, apply the learnings from the wasted-cores paper +and see how the performance works out. With the data from this we should +be able to work with Peter and the rest of the scheduler folks on +a more permanent/elegant solution. +--- + kernel/sched/fair.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c +index c242944f5cbd..5132c828161e 100644 +--- a/kernel/sched/fair.c ++++ b/kernel/sched/fair.c +@@ -5638,6 +5638,20 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f + } + + rcu_read_lock(); ++ ++ if (cpu_rq(prev_cpu)->nr_running) { ++ int _cpu; ++ ++ for_each_online_cpu(_cpu) { ++ if (!cpumask_test_cpu(_cpu, tsk_cpus_allowed(p)) || ++ cpu_rq(_cpu)->nr_running) ++ continue; ++ ++ rcu_read_unlock(); ++ return _cpu; ++ } ++ } ++ + for_each_domain(cpu, tmp) { + if (!(tmp->flags & SD_LOAD_BALANCE)) + break; +-- +2.11.1 + -- cgit v1.2.3-54-g00ecf