lists.openwall.net   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  linux-cve-announce  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]
Message-ID: <20070529175951.GB5411@linux-os.sc.intel.com>
Date:	Tue, 29 May 2007 10:59:51 -0700
From:	Venki Pallipadi <venkatesh.pallipadi@...el.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH 2/4] Make page-writeback timers 1 sec jiffy aligned



timer round_jiffies in page-writeback.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@...el.com>

Index: linux-2.6.22-rc-mm/mm/page-writeback.c
===================================================================
--- linux-2.6.22-rc-mm.orig/mm/page-writeback.c	2007-05-25 10:49:11.000000000 -0700
+++ linux-2.6.22-rc-mm/mm/page-writeback.c	2007-05-25 10:49:29.000000000 -0700
@@ -469,7 +469,7 @@
 	if (time_before(next_jif, jiffies + HZ))
 		next_jif = jiffies + HZ;
 	if (dirty_writeback_interval)
-		mod_timer(&wb_timer, next_jif);
+		mod_timer(&wb_timer, round_jiffies(next_jif));
 }
 
 /*
@@ -481,7 +481,7 @@
 	proc_dointvec_userhz_jiffies(table, write, file, buffer, length, ppos);
 	if (dirty_writeback_interval) {
 		mod_timer(&wb_timer,
-			jiffies + dirty_writeback_interval);
+			round_jiffies(jiffies + dirty_writeback_interval));
 		} else {
 		del_timer(&wb_timer);
 	}
@@ -491,7 +491,8 @@
 static void wb_timer_fn(unsigned long unused)
 {
 	if (pdflush_operation(wb_kupdate, 0) < 0)
-		mod_timer(&wb_timer, jiffies + HZ); /* delay 1 second */
+		mod_timer(&wb_timer, round_jiffies(jiffies + HZ));
+		/* delay 1 second */
 }
 
 static void laptop_flush(unsigned long unused)
@@ -511,7 +512,7 @@
  */
 void laptop_io_completion(void)
 {
-	mod_timer(&laptop_mode_wb_timer, jiffies + laptop_mode);
+	mod_timer(&laptop_mode_wb_timer, round_jiffies(jiffies + laptop_mode));
 }
 
 /*
@@ -582,7 +583,7 @@
  */
 void __init page_writeback_init(void)
 {
-	mod_timer(&wb_timer, jiffies + dirty_writeback_interval);
+	mod_timer(&wb_timer, round_jiffies(jiffies + dirty_writeback_interval));
 	writeback_set_ratelimit();
 	register_cpu_notifier(&ratelimit_nb);
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ