[PATCH 4/4] Make mce polling timers 1 sec jiffy aligned

From: Venki Pallipadi
Date: Tue May 29 2007 - 14:05:31 EST



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

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

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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/