Skip to contentSkip to conversation

2.6.25.2 - Jiffies/Time jumping back and forth (Regereesion from 2.6.24)

DISCUSSION Martin Knoblauch 3 participants 3 messages May 8, 2008 x86

lore
Share & tools
lore
#0 lore raw

----- Original Message ----

Quoted 54 lines

From: Gabriel C <[email protected]>
To: Thomas Gleixner <[email protected]>
Cc: Martin Knoblauch <[email protected]>; Bart Van Assche <[email protected]>; [email protected]; [email protected]
Sent: Thursday, May 8, 2008 2:21:57 PM
Subject: Re: 2.6.25.2 - Jiffies/Time jumping back and forth (Regereesion from 2.6.24)

Quoted 2 lines · Thomas Gleixner
Quoted 1 line · Martin Knoblauch
Quoted 1 line

no this looks different. As soon as the timesource is detected, I see

non-zero

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

timestamps
in dmesg, but they look smaller and jump in both directions. And I have

never

Quoted 8 lines
Quoted 8 lines
Quoted 7 lines

seen this before
2.6.25.

It actually might be a good idea to get the dmesg output from 2.6.24.

Cheers
Martin

interesting - maybe related to clocksources. The HPET seems to be detected

later in 2.6.25:

Quoted 8 lines
Quoted 7 lines

2.6.24:

[    0.000000] Initializing CPU#0
[    0.000000] PID hash table entries: 4096 (order: 12, 32768 bytes)

-->[ 0.000000] hpet clockevent registered
-->[ 0.000000] TSC calibrated against HPET

Quoted 7 lines
Quoted 5 lines

2.6.25.2:

[    0.000000] Initializing CPU#0
[    0.000000] PID hash table entries: 4096 (order: 12, 32768 bytes)

-->[ 0.000000] TSC calibrated against PM_TIMER

That's odd indeed. Is HPET not registered at all in 2.6.25 or does it just

happen late ?

Quoted 4 lines

please provide the output of:
/sys/devices/system/clocksource/clocksource0/available_clocksource /sys/devices/system/clocksource/clocksource0/current_clocksource

I was about to report / ask bout this issue too.

I see the same output for >=2.6.25 , TSC calibrated against PM_TIMER and not against HPET anymore.

[    0.000000] TSC calibrated against PM_TIMER
[    0.000016] time.c: Detected 2499.949 MHz processor.
...
[    0.000999] hpet clockevent registered
Quoted 9 lines

So it seems to register to late in >=2.6.25 kernels ?

cat /sys/devices/system/clocksource/clocksource0/available_clocksource tsc hpet acpi_pm jiffies

cat /sys/devices/system/clocksource/clocksource0/current_clocksource tsc

on two different systems running 2.6.25.2:

ibm x3650(2xDualCore)
-------------------------------------
[root@lpsdm60 ~]# cat /sys/devices/system/clocksource/clocksource0/available_clocksource tsc hpet acpi_pm jiffies
[root@lpsdm60 ~]# cat /sys/devices/system/clocksource/clocksource0/current_clocksource tsc

HP Proliant DL-380G4 (2xSingleCore)
------------------------------------------------------------
[root@lpsdm52 ~]# cat /sys/devices/system/clocksource/clocksource0/available_clocksource tsc hpet acpi_pm jiffies
[root@lpsdm52 ~]# cat /sys/devices/system/clocksource/clocksource0/current_clocksource tsc

and on the DL380G4 running 2.6.24:
---------------------------------------------------------
[root@lpsdm52 ~]# cat /sys/devices/system/clocksource/clocksource0/available_clocksource hpet acpi_pm jiffies tsc
[root@lpsdm52 ~]# cat /sys/devices/system/clocksource/clocksource0/current_clocksource hpet

Cheers
Martin

#1 lore raw
Quoted 16 lines · Martin Knoblauch

on two different systems running 2.6.25.2:

ibm x3650(2xDualCore)
-------------------------------------
[root@lpsdm60 ~]# cat /sys/devices/system/clocksource/clocksource0/available_clocksource tsc hpet acpi_pm jiffies
[root@lpsdm60 ~]# cat /sys/devices/system/clocksource/clocksource0/current_clocksource tsc

HP Proliant DL-380G4 (2xSingleCore)
------------------------------------------------------------
[root@lpsdm52 ~]# cat /sys/devices/system/clocksource/clocksource0/available_clocksource tsc hpet acpi_pm jiffies
[root@lpsdm52 ~]# cat /sys/devices/system/clocksource/clocksource0/current_clocksource tsc

Quoted 6 lines

and on the DL380G4 running 2.6.24:
---------------------------------------------------------
[root@lpsdm52 ~]# cat /sys/devices/system/clocksource/clocksource0/available_clocksource hpet acpi_pm jiffies tsc
[root@lpsdm52 ~]# cat /sys/devices/system/clocksource/clocksource0/current_clocksource hpet

So on 2.6.24 the TSC is declared unstable at some point and 2.6.25 thinks it works fine. Is this the same kernel config (aside of the 24/25 fuzz) ?

Thanks,
tglx

#2 lore raw
Quoted 24 lines · Thomas Gleixner
Quoted 16 lines · Martin Knoblauch

on two different systems running 2.6.25.2:

ibm x3650(2xDualCore)
-------------------------------------
[root@lpsdm60 ~]# cat /sys/devices/system/clocksource/clocksource0/available_clocksource tsc hpet acpi_pm jiffies
[root@lpsdm60 ~]# cat /sys/devices/system/clocksource/clocksource0/current_clocksource tsc

HP Proliant DL-380G4 (2xSingleCore)
------------------------------------------------------------
[root@lpsdm52 ~]# cat /sys/devices/system/clocksource/clocksource0/available_clocksource tsc hpet acpi_pm jiffies
[root@lpsdm52 ~]# cat /sys/devices/system/clocksource/clocksource0/current_clocksource tsc

Quoted 6 lines

and on the DL380G4 running 2.6.24:
---------------------------------------------------------
[root@lpsdm52 ~]# cat /sys/devices/system/clocksource/clocksource0/available_clocksource hpet acpi_pm jiffies tsc
[root@lpsdm52 ~]# cat /sys/devices/system/clocksource/clocksource0/current_clocksource hpet

Quoted 2 lines

So on 2.6.24 the TSC is declared unstable at some point and 2.6.25 thinks it works fine. Is this the same kernel config (aside of the 24/25 fuzz) ?

I had a problem with my P4's tsc being declared unstable after S2R. I carry this patchlet (it's in mainline) in my 2.6.24 kernels to keep the TSC operational. (browsing, dunno if it's the same problem, but it might be..)

arch/x86/kernel/tsc_sync.c +8 -8
index 9125efe..05d8f25 100644
@@ -129,24 +129,24 @@ void __cpuinit check_tsc_sync_source(int cpu)
 	while (atomic_read(&stop_count) != cpus-1)
 		cpu_relax();
 
-	/*
-	 * Reset it - just in case we boot another CPU later:
-	 */
-	atomic_set(&start_count, 0);
-
 	if (nr_warps) {
 		printk("\n");
 		printk(KERN_WARNING "Measured %Ld cycles TSC warp between CPUs,"
 				    " turning off TSC clock.\n", max_warp);
 		mark_tsc_unstable("check_tsc_sync_source failed");
-		nr_warps = 0;
-		max_warp = 0;
-		last_tsc = 0;
 	} else {
 		printk(" passed.\n");
 	}
 
 	/*
+	 * Reset it - just in case we boot another CPU later:
+	 */
+	atomic_set(&start_count, 0);
+	nr_warps = 0;
+	max_warp = 0;
+	last_tsc = 0;
+
+	/*
 	 * Let the target continue with the bootup:
 	 */
 	atomic_inc(&stop_count);