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>] [day] [month] [year] [list]
Date:	Tue, 29 May 2007 11:01:50 -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 4/4] Make mce polling timers 1 sec jiffy aligned


round_jiffies() for i386 and x86-64 non-critical/corrected MCE polling.

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

Index: linux-2.6.22-rc-mm/arch/x86_64/kernel/mce.c
===================================================================
--- linux-2.6.22-rc-mm.orig/arch/x86_64/kernel/mce.c	2007-05-24 11:15:57.000000000 -0700
+++ linux-2.6.22-rc-mm/arch/x86_64/kernel/mce.c	2007-05-25 17:29:21.000000000 -0700
@@ -366,7 +366,8 @@
 		next_interval = min(next_interval*2, check_interval*HZ);
 	}
 
-	schedule_delayed_work(&mcheck_work, next_interval);
+	schedule_delayed_work(&mcheck_work,
+			      round_jiffies_relative(next_interval));
 }
 
 
@@ -374,7 +375,8 @@
 { 
 	next_interval = check_interval * HZ;
 	if (next_interval)
-		schedule_delayed_work(&mcheck_work, next_interval);
+		schedule_delayed_work(&mcheck_work,
+				      round_jiffies_relative(next_interval));
 	return 0;
 } 
 __initcall(periodic_mcheck_init);
@@ -618,7 +620,8 @@
 	on_each_cpu(mce_init, NULL, 1, 1);       
 	next_interval = check_interval * HZ;
 	if (next_interval)
-		schedule_delayed_work(&mcheck_work, next_interval);
+		schedule_delayed_work(&mcheck_work,
+				      round_jiffies_relative(next_interval));
 }
 
 static struct sysdev_class mce_sysclass = {
Index: linux-2.6.22-rc-mm/arch/i386/kernel/cpu/mcheck/non-fatal.c
===================================================================
--- linux-2.6.22-rc-mm.orig/arch/i386/kernel/cpu/mcheck/non-fatal.c	2007-04-25 20:08:32.000000000 -0700
+++ linux-2.6.22-rc-mm/arch/i386/kernel/cpu/mcheck/non-fatal.c	2007-05-25 17:27:49.000000000 -0700
@@ -57,7 +57,7 @@
 static void mce_work_fn(struct work_struct *work)
 { 
 	on_each_cpu(mce_checkregs, NULL, 1, 1);
-	schedule_delayed_work(&mce_work, MCE_RATE);
+	schedule_delayed_work(&mce_work, round_jiffies_relative(MCE_RATE));
 } 
 
 static int __init init_nonfatal_mce_checker(void)
@@ -82,7 +82,7 @@
 	/*
 	 * Check for non-fatal errors every MCE_RATE s
 	 */
-	schedule_delayed_work(&mce_work, MCE_RATE);
+	schedule_delayed_work(&mce_work, round_jiffies_relative(MCE_RATE));
 	printk(KERN_INFO "Machine check exception polling timer started.\n");
 	return 0;
 }
-
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