From acb7aa0db09b8abd38abeb84334a8a27a52fbb1b Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 4 Feb 2013 14:44:33 -0800 Subject: NVMe: Use round_jiffies_relative() for the periodic, once-per-second timer The nvme driver has a "once per second" event where the management kthread wakes up the system and then reschedules itself for 1 second later. For power efficiency reasons, I'd like this timer to happen together with other wakeups in the system. This patch makes the schedule_timeout() call in the kthread use round_jiffies_relative(), causing the wakeup to at least align with other "once per X seconds" events in the kernel. Signed-off-by: Arjan van de Ven Tested-by: Keith Busch Signed-off-by: Matthew Wilcox --- drivers/block/nvme-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/block') diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index a89f7dbefba0..32fdfe9a5156 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -1309,7 +1309,7 @@ static int nvme_kthread(void *data) } spin_unlock(&dev_list_lock); set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); + schedule_timeout(round_jiffies_relative(HZ)); } return 0; } -- cgit v1.2.1