summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt/0113-overload-on-wakeup.patch
diff options
context:
space:
mode:
authorAdrian Calianu <adrian.calianu@enea.com>2017-05-22 08:43:50 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2017-05-23 14:58:35 +0200
commit16b0e3313f53566481c106ace9992e477f8efe9b (patch)
tree5ec03a62db7836d2fb59813cb0c912751556c378 /patches/boot_time_opt/0113-overload-on-wakeup.patch
parent28da254d1c5ae012a6e064671aa14850c2a21a25 (diff)
downloadenea-kernel-cache-16b0e3313f53566481c106ace9992e477f8efe9b.tar.gz
patches: Boot time optimizations with ClearLinux patches
Signed-off-by: Adrian Calianu <adrian.calianu@enea.com> Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'patches/boot_time_opt/0113-overload-on-wakeup.patch')
-rw-r--r--patches/boot_time_opt/0113-overload-on-wakeup.patch43
1 files changed, 43 insertions, 0 deletions
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 @@
1From 9f25d18f45a8391488feb9783404f2f79b7090f4 Mon Sep 17 00:00:00 2001
2From: jplozi <jplozi@unice.fr>
3Date: Fri, 11 Mar 2016 15:18:06 +0100
4Subject: [PATCH 113/124] overload on wakeup
5
6source https://github.com/jplozi/wastedcores
7
8as an experiment, apply the learnings from the wasted-cores paper
9and see how the performance works out. With the data from this we should
10be able to work with Peter and the rest of the scheduler folks on
11a more permanent/elegant solution.
12---
13 kernel/sched/fair.c | 14 ++++++++++++++
14 1 file changed, 14 insertions(+)
15
16diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
17index c242944f5cbd..5132c828161e 100644
18--- a/kernel/sched/fair.c
19+++ b/kernel/sched/fair.c
20@@ -5638,6 +5638,20 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
21 }
22
23 rcu_read_lock();
24+
25+ if (cpu_rq(prev_cpu)->nr_running) {
26+ int _cpu;
27+
28+ for_each_online_cpu(_cpu) {
29+ if (!cpumask_test_cpu(_cpu, tsk_cpus_allowed(p)) ||
30+ cpu_rq(_cpu)->nr_running)
31+ continue;
32+
33+ rcu_read_unlock();
34+ return _cpu;
35+ }
36+ }
37+
38 for_each_domain(cpu, tmp) {
39 if (!(tmp->flags & SD_LOAD_BALANCE))
40 break;
41--
422.11.1
43