Skip to contentSkip to conversation

x86, mce: use round_jiffies() instead round_jiffies_relative()

PATCH In review KOSAKI Motohiro 3 participants 3 messages Mar 11, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, mce: use round_jiffies() instead round_jiffies_relative()

Impact: saving power _very_ little

round_jiffies() round up absolute jiffies to full second. round_jiffies_relative() round up relative jiffies to full second.

The "t->expires" is absolute jiffies. Then, round_jiffies() should be used instead round_jiffies_relative().

Cc Andi Kleen <[email protected]>
Cc H. Peter Anvin <[email protected]>
---
 arch/x86/kernel/cpu/mcheck/mce_64.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/mcheck/mce_64.c +2 -2
index bfbd532..ca14604 100644
@@ -639,7 +639,7 @@ static void mce_init_timer(void)
 	if (!next_interval)
 		return;
 	setup_timer(t, mcheck_timer, smp_processor_id());
-	t->expires = round_jiffies_relative(jiffies + next_interval);
+	t->expires = round_jiffies(jiffies + next_interval);
 	add_timer(t);
 }
 
@@ -1110,7 +1110,7 @@ static int __cpuinit mce_cpu_callback(struct notifier_block *nfb,
 		break;
 	case CPU_DOWN_FAILED:
 	case CPU_DOWN_FAILED_FROZEN:
-		t->expires = round_jiffies_relative(jiffies + next_interval);
+		t->expires = round_jiffies(jiffies + next_interval);
 		add_timer_on(t, cpu);
 		smp_call_function_single(cpu, mce_reenable_cpu, &action, 1);
 		break;
Signature · 1 line
1.6.1.2
#1 lore raw
Quoted 7 lines · KOSAKI Motohiro

Impact: saving power _very_ little

round_jiffies() round up absolute jiffies to full second. round_jiffies_relative() round up relative jiffies to full second.

The "t->expires" is absolute jiffies. Then, round_jiffies() should be used instead round_jiffies_relative().

Thanks. I have a rewrite of this code pending. I added it to this.

-Andi

#2 lore raw
Quoted 11 lines · Andi Kleen
Quoted 7 lines · KOSAKI Motohiro

Impact: saving power _very_ little

round_jiffies() round up absolute jiffies to full second. round_jiffies_relative() round up relative jiffies to full second.

The "t->expires" is absolute jiffies. Then, round_jiffies() should be used instead round_jiffies_relative().

Thanks. I have a rewrite of this code pending. I added it to this.

It's already queued up in tip:x86/mce2.

Ingo