blob: c4472a1f477ec8dba44883c1ed64a18c551163e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
From 7cb71dfb076d5201c7cee4b4c3e85d98f9695cc3 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Mon, 14 Mar 2016 11:06:46 -0600
Subject: [PATCH 111/114] ksm-wakeups
reduce wakeups in ksm
---
mm/ksm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/mm/ksm.c b/mm/ksm.c
index 216184af0e19..1e7e4e8bb5f9 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -1767,8 +1767,12 @@ static int ksm_scan_thread(void *nothing)
try_to_freeze();
if (ksmd_should_run()) {
- schedule_timeout_interruptible(
- msecs_to_jiffies(ksm_thread_sleep_millisecs));
+ if (ksm_thread_sleep_millisecs >= 1000)
+ schedule_timeout_interruptible(
+ msecs_to_jiffies(round_jiffies_relative(ksm_thread_sleep_millisecs)));
+ else
+ schedule_timeout_interruptible(
+ msecs_to_jiffies(ksm_thread_sleep_millisecs));
} else {
wait_event_freezable(ksm_thread_wait,
ksmd_should_run() || kthread_should_stop());
--
2.13.2
|