lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 10 Nov 2009 16:22:19 -0800
From:	Randy Dunlap <>
To:	lkml <>,
	Jens Axboe <>
Subject: [PATCH] block core: use round_jiffies on timer to reduce wakeups

From: Randy Dunlap <>

Use round_jiffies() variant to schedule the timer along with
other timer wakeups on the same CPU.

Source file also needs to include jiffies.h since it uses
functions or macros from it.

Signed-off-by: Randy Dunlap <>
 block/blk-core.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- lnx-2632-rc6.orig/block/blk-core.c
+++ lnx-2632-rc6/block/blk-core.c
@@ -17,6 +17,7 @@
 #include <linux/bio.h>
 #include <linux/blkdev.h>
 #include <linux/highmem.h>
+#include <linux/jiffies.h>
 #include <linux/mm.h>
 #include <linux/kernel_stat.h>
 #include <linux/string.h>
@@ -212,7 +213,8 @@ void blk_plug_device(struct request_queu
 	if (!queue_flag_test_and_set(QUEUE_FLAG_PLUGGED, q)) {
-		mod_timer(&q->unplug_timer, jiffies + q->unplug_delay);
+		mod_timer(&q->unplug_timer,
+			round_jiffies_up(jiffies + q->unplug_delay));
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists