Re: Regression in 2.6.27 caused by commit bfc0f59

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Thomas Gleixner
Date: Tuesday, September 2, 2008 - 5:15 am

On Mon, 1 Sep 2008, Linus Torvalds wrote:

About anything between 0 and useful, but still I had cases where the
pit_count was way above the 25000 but the TSC was off by factor 2.

Went down the road and instrumented the code:

   unsinged long tsc_deltas[50000];

   start_pit();
   tsc1 = tsc = read_tsc_start();
   while (!pit_ready()) {
   	 tsc2 = read_tsc();
 	 tsc_deltas[pit_count++] = tsc2 - tsc;
	 tsc = tsc2;
   }

Analysing the tsc_deltas gave interesting insight. On the affected
laptop I had several entries where the delta between two reads was
from 1msec up to 120msec maximum. 

As the code does nothing else and has interrupts disabled there is
only one explanation: the SMM/SMI black hole.

If this high delta hits after the pit_count reached 25000 we still
believe that our calibration against pit is fine :(

So what I'm working on is an algorithm, which is similar to the checks
in the tsc_read_refs() function. That should allow us to detect
whether one of the reads is way off by doing a min/max detection. In
such a case we can either repeat the calibration or try to figure out
whether the pmtimer / hpet can provide us with some useful reference.

Thanks,

	tglx






--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Regression in 2.6.27 caused by commit bfc0f59, Larry Finger, (Sun Aug 31, 3:54 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Mon Sep 1, 4:14 am)
Re: Regression in 2.6.27 caused by commit bfc0f59, Larry Finger, (Mon Sep 1, 8:37 am)
Re: Regression in 2.6.27 caused by commit bfc0f59, Larry Finger, (Mon Sep 1, 10:44 am)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Mon Sep 1, 10:49 am)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Mon Sep 1, 11:31 am)
Re: Regression in 2.6.27 caused by commit bfc0f59, Linus Torvalds, (Mon Sep 1, 11:42 am)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Mon Sep 1, 12:08 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Linus Torvalds, (Mon Sep 1, 12:10 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Larry Finger, (Mon Sep 1, 12:36 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Mon Sep 1, 1:07 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Mon Sep 1, 1:09 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Larry Finger, (Mon Sep 1, 1:23 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Mon Sep 1, 1:45 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Mon Sep 1, 2:30 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Linus Torvalds, (Mon Sep 1, 3:02 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Linus Torvalds, (Mon Sep 1, 3:16 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Mon Sep 1, 3:33 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Linus Torvalds, (Mon Sep 1, 3:56 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Mon Sep 1, 4:16 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Mon Sep 1, 4:24 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Linus Torvalds, (Mon Sep 1, 8:18 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Linus Torvalds, (Mon Sep 1, 8:35 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Larry Finger, (Mon Sep 1, 9:54 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Andi Kleen, (Mon Sep 1, 11:37 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Tue Sep 2, 5:15 am)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Tue Sep 2, 5:21 am)
Re: Regression in 2.6.27 caused by commit bfc0f59, Linus Torvalds, (Tue Sep 2, 8:09 am)
Re: Regression in 2.6.27 caused by commit bfc0f59, Bill Davidsen, (Tue Sep 2, 10:17 am)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Tue Sep 2, 11:14 am)
Re: Regression in 2.6.27 caused by commit bfc0f59, Alok Kataria, (Tue Sep 2, 11:41 am)
Re: Regression in 2.6.27 caused by commit bfc0f59, Linus Torvalds, (Tue Sep 2, 11:42 am)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Tue Sep 2, 2:13 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Tue Sep 2, 2:16 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Linus Torvalds, (Tue Sep 2, 3:21 pm)
[PATCH] Fix TSC calibration issues, Thomas Gleixner, (Tue Sep 2, 3:54 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Thomas Gleixner, (Tue Sep 2, 4:10 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Linus Torvalds, (Tue Sep 2, 6:49 pm)
Re: [PATCH] Fix TSC calibration issues, Linus Torvalds, (Tue Sep 2, 7:14 pm)
Re: [PATCH] Fix TSC calibration issues, Larry Finger, (Tue Sep 2, 7:51 pm)
Re: [PATCH] Fix TSC calibration issues, Linus Torvalds, (Tue Sep 2, 9:00 pm)
Re: [PATCH] Fix TSC calibration issues, Larry Finger, (Tue Sep 2, 9:34 pm)
Re: [PATCH] Fix TSC calibration issues, Thomas Gleixner, (Wed Sep 3, 2:11 am)
Re: [PATCH] Fix TSC calibration issues, Alok Kataria, (Wed Sep 3, 6:14 pm)
[PATCH] Change warning message in TSC calibration., Alok Kataria, (Wed Sep 3, 6:18 pm)
Re: [PATCH] Fix TSC calibration issues, Linus Torvalds, (Wed Sep 3, 7:56 pm)
Re: [PATCH] Fix TSC calibration issues, Arjan van de Ven, (Wed Sep 3, 8:16 pm)
Re: [PATCH] Fix TSC calibration issues, Linus Torvalds, (Wed Sep 3, 8:59 pm)
Re: [PATCH] Fix TSC calibration issues, Arjan van de Ven, (Wed Sep 3, 9:10 pm)
Re: [PATCH] Fix TSC calibration issues, Linus Torvalds, (Wed Sep 3, 9:20 pm)
Re: [PATCH] Fix TSC calibration issues, Willy Tarreau, (Wed Sep 3, 9:25 pm)
Re: [PATCH] Fix TSC calibration issues, Arjan van de Ven, (Wed Sep 3, 9:27 pm)
Re: [PATCH] Fix TSC calibration issues, Linus Torvalds, (Wed Sep 3, 9:53 pm)
Re: [PATCH] Fix TSC calibration issues, Willy Tarreau, (Wed Sep 3, 10:09 pm)
Re: Regression in 2.6.27 caused by commit bfc0f59, Mark Lord, (Fri Sep 5, 6:45 am)