summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt/0107-ksm-wakeups.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/boot_time_opt/0107-ksm-wakeups.patch')
-rw-r--r--patches/boot_time_opt/0107-ksm-wakeups.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/patches/boot_time_opt/0107-ksm-wakeups.patch b/patches/boot_time_opt/0107-ksm-wakeups.patch
new file mode 100644
index 0000000..2b25625
--- /dev/null
+++ b/patches/boot_time_opt/0107-ksm-wakeups.patch
@@ -0,0 +1,34 @@
1From a5de04044d428bf54472365e7dc07958aa184daf Mon Sep 17 00:00:00 2001
2From: Arjan van de Ven <arjan@linux.intel.com>
3Date: Mon, 14 Mar 2016 11:06:46 -0600
4Subject: [PATCH 107/124] ksm-wakeups
5
6reduce wakeups in ksm by adding rounding (aligning) when the sleep times are 1 second or longer
7
8Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
9---
10 mm/ksm.c | 8 ++++++--
11 1 file changed, 6 insertions(+), 2 deletions(-)
12
13diff --git a/mm/ksm.c b/mm/ksm.c
14index 9ae6011a41f8..eecd3ff669e2 100644
15--- a/mm/ksm.c
16+++ b/mm/ksm.c
17@@ -1725,8 +1725,12 @@ static int ksm_scan_thread(void *nothing)
18 try_to_freeze();
19
20 if (ksmd_should_run()) {
21- schedule_timeout_interruptible(
22- msecs_to_jiffies(ksm_thread_sleep_millisecs));
23+ if (ksm_thread_sleep_millisecs >= 1000)
24+ schedule_timeout_interruptible(
25+ msecs_to_jiffies(round_jiffies_relative(ksm_thread_sleep_millisecs)));
26+ else
27+ schedule_timeout_interruptible(
28+ msecs_to_jiffies(ksm_thread_sleep_millisecs));
29 } else {
30 wait_event_freezable(ksm_thread_wait,
31 ksmd_should_run() || kthread_should_stop());
32--
332.11.1
34