]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - mm/ksm.c
UBUNTU: Start new release
[mirror_ubuntu-zesty-kernel.git] / mm / ksm.c
index 9ae6011a41f895d56942175814d1fe0158a591b7..eecd3ff669e2bbe1e25cc2719c83ad354082b8f3 100644 (file)
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -1725,8 +1725,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());