summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt/0106-ksm-wakeups.patch
diff options
context:
space:
mode:
authorMartin Borg <martin.borg@enea.com>2018-03-23 14:01:03 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2018-03-26 09:57:31 +0200
commitc4bd5f6e084a6ced2c7a2f76798d0a34947ffeb7 (patch)
treee46d5f9bceca1947817b7739d366aa44faea9be1 /patches/boot_time_opt/0106-ksm-wakeups.patch
parentdfc8946f58bbf4aa3a345c4fb5d5895502936edd (diff)
downloadenea-kernel-cache-c4bd5f6e084a6ced2c7a2f76798d0a34947ffeb7.tar.gz
boot_time_opt: update host boot time optimization patches for 4.14
The new patches are based on: https://github.com/clearlinux-pkgs/linux-lts commit 5595fe425a52af6734235a1a953b6b03210060ec Signed-off-by: Martin Borg <martin.borg@enea.com> Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
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;