public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH for -tip] x86, mce: use round_jiffies() instead round_jiffies_relative()
@ 2009-03-11  1:14 KOSAKI Motohiro
  2009-03-11  2:14 ` Andi Kleen
  0 siblings, 1 reply; 3+ messages in thread
From: KOSAKI Motohiro @ 2009-03-11  1:14 UTC (permalink / raw)
  To: LKML; +Cc: kosaki.motohiro, Andi Kleen, H. Peter Anvin, Ingo Molnar

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().


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/kernel/cpu/mcheck/mce_64.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index bfbd532..ca14604 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -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;
-- 
1.6.1.2




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH for -tip] x86, mce: use round_jiffies() instead round_jiffies_relative()
  2009-03-11  1:14 [PATCH for -tip] x86, mce: use round_jiffies() instead round_jiffies_relative() KOSAKI Motohiro
@ 2009-03-11  2:14 ` Andi Kleen
  2009-03-11 10:28   ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2009-03-11  2:14 UTC (permalink / raw)
  To: KOSAKI Motohiro; +Cc: LKML, Andi Kleen, H. Peter Anvin, Ingo Molnar

On Wed, Mar 11, 2009 at 10:14:26AM +0900, KOSAKI Motohiro wrote:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH for -tip] x86, mce: use round_jiffies() instead round_jiffies_relative()
  2009-03-11  2:14 ` Andi Kleen
@ 2009-03-11 10:28   ` Ingo Molnar
  0 siblings, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2009-03-11 10:28 UTC (permalink / raw)
  To: Andi Kleen; +Cc: KOSAKI Motohiro, LKML, H. Peter Anvin


* Andi Kleen <andi@firstfloor.org> wrote:

> On Wed, Mar 11, 2009 at 10:14:26AM +0900, KOSAKI Motohiro wrote:
> > 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-11 10:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-11  1:14 [PATCH for -tip] x86, mce: use round_jiffies() instead round_jiffies_relative() KOSAKI Motohiro
2009-03-11  2:14 ` Andi Kleen
2009-03-11 10:28   ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox