summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt_guest/0112-ksm-wakeups.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/boot_time_opt_guest/0112-ksm-wakeups.patch')
-rw-r--r--patches/boot_time_opt_guest/0112-ksm-wakeups.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/patches/boot_time_opt_guest/0112-ksm-wakeups.patch b/patches/boot_time_opt_guest/0112-ksm-wakeups.patch
new file mode 100644
index 0000000..b131e3f
--- /dev/null
+++ b/patches/boot_time_opt_guest/0112-ksm-wakeups.patch
@@ -0,0 +1,32 @@
1From 2dc48e4b5c651691b7028991b64c935047b41b19 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 112/114] ksm-wakeups
5
6reduce wakeups in ksm
7---
8 mm/ksm.c | 8 ++++++--
9 1 file changed, 6 insertions(+), 2 deletions(-)
10
11diff --git a/mm/ksm.c b/mm/ksm.c
12index 9ae6011a41f8..eecd3ff669e2 100644
13--- a/mm/ksm.c
14+++ b/mm/ksm.c
15@@ -1725,8 +1725,12 @@ static int ksm_scan_thread(void *nothing)
16 try_to_freeze();
17
18 if (ksmd_should_run()) {
19- schedule_timeout_interruptible(
20- msecs_to_jiffies(ksm_thread_sleep_millisecs));
21+ if (ksm_thread_sleep_millisecs >= 1000)
22+ schedule_timeout_interruptible(
23+ msecs_to_jiffies(round_jiffies_relative(ksm_thread_sleep_millisecs)));
24+ else
25+ schedule_timeout_interruptible(
26+ msecs_to_jiffies(ksm_thread_sleep_millisecs));
27 } else {
28 wait_event_freezable(ksm_thread_wait,
29 ksmd_should_run() || kthread_should_stop());
30--
312.11.1
32