diff options
Diffstat (limited to 'patches/boot_time_opt/0113-overload-on-wakeup.patch')
-rw-r--r-- | patches/boot_time_opt/0113-overload-on-wakeup.patch | 43 |
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 @@ | |||
1 | From 9f25d18f45a8391488feb9783404f2f79b7090f4 Mon Sep 17 00:00:00 2001 | ||
2 | From: jplozi <jplozi@unice.fr> | ||
3 | Date: Fri, 11 Mar 2016 15:18:06 +0100 | ||
4 | Subject: [PATCH 113/124] overload on wakeup | ||
5 | |||
6 | source https://github.com/jplozi/wastedcores | ||
7 | |||
8 | as an experiment, apply the learnings from the wasted-cores paper | ||
9 | and see how the performance works out. With the data from this we should | ||
10 | be able to work with Peter and the rest of the scheduler folks on | ||
11 | a more permanent/elegant solution. | ||
12 | --- | ||
13 | kernel/sched/fair.c | 14 ++++++++++++++ | ||
14 | 1 file changed, 14 insertions(+) | ||
15 | |||
16 | diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c | ||
17 | index 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 | -- | ||
42 | 2.11.1 | ||
43 | |||