summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt_guest/0111-ksm-wakeups.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/boot_time_opt_guest/0111-ksm-wakeups.patch')
-rw-r--r--patches/boot_time_opt_guest/0111-ksm-wakeups.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/patches/boot_time_opt_guest/0111-ksm-wakeups.patch b/patches/boot_time_opt_guest/0111-ksm-wakeups.patch
new file mode 100644
index 0000000..c4472a1
--- /dev/null
+++ b/patches/boot_time_opt_guest/0111-ksm-wakeups.patch
@@ -0,0 +1,32 @@
1From 7cb71dfb076d5201c7cee4b4c3e85d98f9695cc3 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 111/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 216184af0e19..1e7e4e8bb5f9 100644
13--- a/mm/ksm.c
14+++ b/mm/ksm.c
15@@ -1767,8 +1767,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.13.2
32