summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt/0106-ksm-wakeups.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/boot_time_opt/0106-ksm-wakeups.patch')
-rw-r--r--patches/boot_time_opt/0106-ksm-wakeups.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/patches/boot_time_opt/0106-ksm-wakeups.patch b/patches/boot_time_opt/0106-ksm-wakeups.patch
new file mode 100644
index 0000000..ad82b93
--- /dev/null
+++ b/patches/boot_time_opt/0106-ksm-wakeups.patch
@@ -0,0 +1,45 @@
1From 8350ca263ae0f06ae6a40b5e9ba280fb09aff895 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 106/126] 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 6cb60f46cce5..883a9441e055 100644
15--- a/mm/ksm.c
16+++ b/mm/ksm.c
17@@ -2335,8 +2335,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.15.0
34
35--- linux-4.14/kernel/watchdog.c~ 2017-11-12 18:46:13.000000000 +0000
36+++ linux-4.14/kernel/watchdog.c 2017-11-19 17:34:20.740254694 +0000
37@@ -44,7 +44,7 @@
38 int __read_mostly watchdog_user_enabled = 1;
39 int __read_mostly nmi_watchdog_user_enabled = NMI_WATCHDOG_DEFAULT;
40 int __read_mostly soft_watchdog_user_enabled = 1;
41-int __read_mostly watchdog_thresh = 10;
42+int __read_mostly watchdog_thresh = 40;
43 int __read_mostly nmi_watchdog_available;
44
45 struct cpumask watchdog_allowed_mask __read_mostly;