]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - mm/ksm.c
platform/x86: dell-laptop: Allocate buffer on heap rather than globally
[mirror_ubuntu-bionic-kernel.git] / mm / ksm.c
index be8f4576f84211499e269f4c69f993a975a8e0a9..b16fb51113b93b0d976b43483caf145f8d372558 100644 (file)
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -2346,8 +2346,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());