Re: [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v1
On Monday 14 May 2007 23:05:14 Thomas Gleixner wrote: > On Mon, 2007-05-14 at 22:15 +0100, Alistair John Strachan wrote: > > On Monday 14 May 2007 11:26:08 Thomas Gleixner wrote: > > > I'm pleased to announce an updated version of the x86_64 > > > highres/dyntick support patches against 2.6.22-rc1: > > > > [snip] > > > > > - Various fixups from Chris Wright > > > - TSC calibration fix (pointed out by Alistair John Strachan) > > > > > > Comments, bugreports, patches are welcome as ususal > > > > Neither of the bugs I reported appear to be fixed. > > > > I took a clean git tree from the 2.6.22-rc1 tag and patched with this > > version; my CPU MHz and dmesg counter still appear to be broken (v3 was > > used). > > Sigh. /me feels stupid. > > Can you please apply the following patch on top and check, whether it > fixes the problem ? Please provide the debug output, when it fails. Doesn't fix the problem, and here is the debug: TSC calibrated against pm_timer 8927439 9106459 179020 640810145 tsckhz: 1350695500 640810145 210779356 Marking TSC unstable due to TSCs unsynchronized time.c: Detected 210779.356 MHz processor. (Perhaps if this debug effort has to continue, we could remove some of these gentlemen from CC?) -- Cheers, Alistair. Final year Computer Science undergraduate. 1F2 55 South Clerk Street, Edinburgh, UK. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v1
On Mon, 2007-05-14 at 22:15 +0100, Alistair John Strachan wrote: > On Monday 14 May 2007 11:26:08 Thomas Gleixner wrote: > > I'm pleased to announce an updated version of the x86_64 highres/dyntick > > support patches against 2.6.22-rc1: > [snip] > > - Various fixups from Chris Wright > > - TSC calibration fix (pointed out by Alistair John Strachan) > > > > Comments, bugreports, patches are welcome as ususal > > Neither of the bugs I reported appear to be fixed. > > I took a clean git tree from the 2.6.22-rc1 tag and patched with this > version; > my CPU MHz and dmesg counter still appear to be broken (v3 was used). Sigh. /me feels stupid. Can you please apply the following patch on top and check, whether it fixes the problem ? Please provide the debug output, when it fails. Thanks, tglx Index: linux-2.6.21/arch/x86_64/kernel/tsc.c === --- linux-2.6.21.orig/arch/x86_64/kernel/tsc.c +++ linux-2.6.21/arch/x86_64/kernel/tsc.c @@ -135,7 +135,7 @@ static unsigned long __init tsc_read_ref for (i = 0; i < MAX_RETRIES; i++) { t1 = get_cycles_sync(); if (hpet) - *hpet = hpet_readl(HPET_COUNTER); + *hpet = hpet_readl(HPET_COUNTER) & 0x; else *pm = acpi_pm_read_early(); t2 = get_cycles_sync(); @@ -177,8 +177,10 @@ void __init tsc_calibrate(void) tsc_khz = (tr2 - tr1) / 50; /* hpet or pmtimer available ? */ - if (!hpet && !pm1 && !pm2) + if (!hpet && !pm1 && !pm2) { + printk(KERN_INFO "TSC calibrated against tick interrupt\n"); return; + } /* Check, whether the sampling was disturbed by an SMI */ if (tsc1 == ULONG_MAX || tsc2 == ULONG_MAX) { @@ -190,14 +192,25 @@ void __init tsc_calibrate(void) tsc2 = (tsc2 - tsc1) * 10L; if (hpet) { - hpet2 = (hpet2 - hpet1) & 0x; + printk(KERN_INFO "TSC calibrated against hpet %ld %ld", + hpet1, hpet2); + if (hpet2 < hpet1) + hpet2 += 0x1; + hpet2 -= hpet1; tsc1 = (hpet2 * hpet_readl(HPET_PERIOD)) / 1000; + printk(" %lu %lu\n", hpet2, tsc1); } else { - pm2 = (pm2 -pm1) & ACPI_PM_MASK; + printk(KERN_INFO "TSC calibrated against pm_timer %ld %ld", + pm1, pm2); + if (pm2 < pm1) + pm2 += ACPI_PM_OVRRUN; + pm2 -= pm1; tsc1 = (pm2 * PMTMR_TICKS_PER_SEC) / 1000; + printk(" %lu %lu\n", pm2, tsc1); } tsc_khz = tsc2 / tsc1; + printk(KERN_INFO "tsckhz: %lu %lu %u\n", tsc2, tsc1, tsc_khz); } /* - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v1
On Monday 14 May 2007 11:26:08 Thomas Gleixner wrote: > I'm pleased to announce an updated version of the x86_64 highres/dyntick > support patches against 2.6.22-rc1: [snip] > - Various fixups from Chris Wright > - TSC calibration fix (pointed out by Alistair John Strachan) > > Comments, bugreports, patches are welcome as ususal Neither of the bugs I reported appear to be fixed. I took a clean git tree from the 2.6.22-rc1 tag and patched with this version; my CPU MHz and dmesg counter still appear to be broken (v3 was used). -- Cheers, Alistair. Final year Computer Science undergraduate. 1F2 55 South Clerk Street, Edinburgh, UK. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v1
On Mon, 2007-05-14 at 16:10 -0400, [EMAIL PROTECTED] wrote: > On Mon, 14 May 2007 12:26:08 +0200, Thomas Gleixner said: > > > Broken out version is available here: > > http://www.tglx.de/projects/hrtimers/2.6.22-rc1/linux-2.6.22-rc1-x86_64-highres-v1.patches.tar.bz2 > > How unhappy am I likely to be if I try to apply this to a 21-mm2 kernel? It > doesn't *look* like any of the patches are in -mm2 (at least not under the > same name). There are probably some conflicts, but the wreckage should be not that big. tglx - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v1
On Mon, 14 May 2007 12:26:08 +0200, Thomas Gleixner said: > Broken out version is available here: > http://www.tglx.de/projects/hrtimers/2.6.22-rc1/linux-2.6.22-rc1-x86_64-highres-v1.patches.tar.bz2 How unhappy am I likely to be if I try to apply this to a 21-mm2 kernel? It doesn't *look* like any of the patches are in -mm2 (at least not under the same name). pgpj81sRghFdg.pgp Description: PGP signature
[PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v1
I'm pleased to announce an updated version of the x86_64 highres/dyntick support patches against 2.6.22-rc1: To build a highres / dyntick enabled kernel for x86_64: http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.tar.bz2 http://www.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.22-rc1.bz2 http://www.tglx.de/projects/hrtimers/2.6.22-rc1/linux-2.6.22-rc1-x86_64-highres-v1.patch Broken out version is available here: http://www.tglx.de/projects/hrtimers/2.6.22-rc1/linux-2.6.22-rc1-x86_64-highres-v1.patches.tar.bz2 Changes since the last version: - Various fixups from Chris Wright - TSC calibration fix (pointed out by Alistair John Strachan) Comments, bugreports, patches are welcome as ususal Thanks, tglx - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v1
I'm pleased to announce an updated version of the x86_64 highres/dyntick support patches against 2.6.22-rc1: To build a highres / dyntick enabled kernel for x86_64: http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.tar.bz2 http://www.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.22-rc1.bz2 http://www.tglx.de/projects/hrtimers/2.6.22-rc1/linux-2.6.22-rc1-x86_64-highres-v1.patch Broken out version is available here: http://www.tglx.de/projects/hrtimers/2.6.22-rc1/linux-2.6.22-rc1-x86_64-highres-v1.patches.tar.bz2 Changes since the last version: - Various fixups from Chris Wright - TSC calibration fix (pointed out by Alistair John Strachan) Comments, bugreports, patches are welcome as ususal Thanks, tglx - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v1
On Mon, 14 May 2007 12:26:08 +0200, Thomas Gleixner said: Broken out version is available here: http://www.tglx.de/projects/hrtimers/2.6.22-rc1/linux-2.6.22-rc1-x86_64-highres-v1.patches.tar.bz2 How unhappy am I likely to be if I try to apply this to a 21-mm2 kernel? It doesn't *look* like any of the patches are in -mm2 (at least not under the same name). pgpj81sRghFdg.pgp Description: PGP signature
Re: [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v1
On Mon, 2007-05-14 at 16:10 -0400, [EMAIL PROTECTED] wrote: On Mon, 14 May 2007 12:26:08 +0200, Thomas Gleixner said: Broken out version is available here: http://www.tglx.de/projects/hrtimers/2.6.22-rc1/linux-2.6.22-rc1-x86_64-highres-v1.patches.tar.bz2 How unhappy am I likely to be if I try to apply this to a 21-mm2 kernel? It doesn't *look* like any of the patches are in -mm2 (at least not under the same name). There are probably some conflicts, but the wreckage should be not that big. tglx - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v1
On Monday 14 May 2007 11:26:08 Thomas Gleixner wrote: I'm pleased to announce an updated version of the x86_64 highres/dyntick support patches against 2.6.22-rc1: [snip] - Various fixups from Chris Wright - TSC calibration fix (pointed out by Alistair John Strachan) Comments, bugreports, patches are welcome as ususal Neither of the bugs I reported appear to be fixed. I took a clean git tree from the 2.6.22-rc1 tag and patched with this version; my CPU MHz and dmesg counter still appear to be broken (v3 was used). -- Cheers, Alistair. Final year Computer Science undergraduate. 1F2 55 South Clerk Street, Edinburgh, UK. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v1
On Mon, 2007-05-14 at 22:15 +0100, Alistair John Strachan wrote: On Monday 14 May 2007 11:26:08 Thomas Gleixner wrote: I'm pleased to announce an updated version of the x86_64 highres/dyntick support patches against 2.6.22-rc1: [snip] - Various fixups from Chris Wright - TSC calibration fix (pointed out by Alistair John Strachan) Comments, bugreports, patches are welcome as ususal Neither of the bugs I reported appear to be fixed. I took a clean git tree from the 2.6.22-rc1 tag and patched with this version; my CPU MHz and dmesg counter still appear to be broken (v3 was used). Sigh. /me feels stupid. Can you please apply the following patch on top and check, whether it fixes the problem ? Please provide the debug output, when it fails. Thanks, tglx Index: linux-2.6.21/arch/x86_64/kernel/tsc.c === --- linux-2.6.21.orig/arch/x86_64/kernel/tsc.c +++ linux-2.6.21/arch/x86_64/kernel/tsc.c @@ -135,7 +135,7 @@ static unsigned long __init tsc_read_ref for (i = 0; i MAX_RETRIES; i++) { t1 = get_cycles_sync(); if (hpet) - *hpet = hpet_readl(HPET_COUNTER); + *hpet = hpet_readl(HPET_COUNTER) 0x; else *pm = acpi_pm_read_early(); t2 = get_cycles_sync(); @@ -177,8 +177,10 @@ void __init tsc_calibrate(void) tsc_khz = (tr2 - tr1) / 50; /* hpet or pmtimer available ? */ - if (!hpet !pm1 !pm2) + if (!hpet !pm1 !pm2) { + printk(KERN_INFO TSC calibrated against tick interrupt\n); return; + } /* Check, whether the sampling was disturbed by an SMI */ if (tsc1 == ULONG_MAX || tsc2 == ULONG_MAX) { @@ -190,14 +192,25 @@ void __init tsc_calibrate(void) tsc2 = (tsc2 - tsc1) * 10L; if (hpet) { - hpet2 = (hpet2 - hpet1) 0x; + printk(KERN_INFO TSC calibrated against hpet %ld %ld, + hpet1, hpet2); + if (hpet2 hpet1) + hpet2 += 0x1; + hpet2 -= hpet1; tsc1 = (hpet2 * hpet_readl(HPET_PERIOD)) / 1000; + printk( %lu %lu\n, hpet2, tsc1); } else { - pm2 = (pm2 -pm1) ACPI_PM_MASK; + printk(KERN_INFO TSC calibrated against pm_timer %ld %ld, + pm1, pm2); + if (pm2 pm1) + pm2 += ACPI_PM_OVRRUN; + pm2 -= pm1; tsc1 = (pm2 * PMTMR_TICKS_PER_SEC) / 1000; + printk( %lu %lu\n, pm2, tsc1); } tsc_khz = tsc2 / tsc1; + printk(KERN_INFO tsckhz: %lu %lu %u\n, tsc2, tsc1, tsc_khz); } /* - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v1
On Monday 14 May 2007 23:05:14 Thomas Gleixner wrote: On Mon, 2007-05-14 at 22:15 +0100, Alistair John Strachan wrote: On Monday 14 May 2007 11:26:08 Thomas Gleixner wrote: I'm pleased to announce an updated version of the x86_64 highres/dyntick support patches against 2.6.22-rc1: [snip] - Various fixups from Chris Wright - TSC calibration fix (pointed out by Alistair John Strachan) Comments, bugreports, patches are welcome as ususal Neither of the bugs I reported appear to be fixed. I took a clean git tree from the 2.6.22-rc1 tag and patched with this version; my CPU MHz and dmesg counter still appear to be broken (v3 was used). Sigh. /me feels stupid. Can you please apply the following patch on top and check, whether it fixes the problem ? Please provide the debug output, when it fails. Doesn't fix the problem, and here is the debug: TSC calibrated against pm_timer 8927439 9106459 179020 640810145 tsckhz: 1350695500 640810145 210779356 Marking TSC unstable due to TSCs unsynchronized time.c: Detected 210779.356 MHz processor. (Perhaps if this debug effort has to continue, we could remove some of these gentlemen from CC?) -- Cheers, Alistair. Final year Computer Science undergraduate. 1F2 55 South Clerk Street, Edinburgh, UK. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/