summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt_guest/0111-overload-on-wakeup.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/boot_time_opt_guest/0111-overload-on-wakeup.patch')
-rw-r--r--patches/boot_time_opt_guest/0111-overload-on-wakeup.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/patches/boot_time_opt_guest/0111-overload-on-wakeup.patch b/patches/boot_time_opt_guest/0111-overload-on-wakeup.patch
new file mode 100644
index 0000000..724e9a9
--- /dev/null
+++ b/patches/boot_time_opt_guest/0111-overload-on-wakeup.patch
@@ -0,0 +1,43 @@
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: jplozi <jplozi@unice.fr>
3Date: Fri, 11 Mar 2016 15:18:06 +0100
4Subject: [PATCH] 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 c0c4d9ad7da8..a59694f24106 100644
18--- a/kernel/sched/fair.c
19+++ b/kernel/sched/fair.c
20@@ -6693,6 +6693,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, p->cpus_ptr) ||
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 /*
40 * If both 'cpu' and 'prev_cpu' are part of this domain,
41--
42https://clearlinux.org
43