2.6.37 dom0 under Xen 4.1 clocksource not working
Subsystems (2)
When booting 2.6.37 (from kernel.org) under Xen 4.1, there are apparently issues with timer interrupts being delivered to the dom0. Repeatedly causing an interrupt (for example, the ACPI power button) will allow the system to boot, as does adding "clocksource=jiffies" to the kernel command line. This is only present under Xen, not when booting the same kernel on real hardware.
When boot with clocksource=jiffies, the system will sometimes freeze for about 30 seconds and then continue; however, this could be related to kernel debugging that I have enabled.
The only clock-related message in dmesg is:
[ 153.483813] Clocksource tsc unstable (delta = -77312555973 ns)
/sys/devices/system/clocksource/clocksource0/available_clocksource:
xen jiffies tsc
I can attach kernel config or other information as required. I have observed this on at least two platforms; the 2.6.32.x xen kernels do not exhibit this behavior.
Signature · 2 lines
Daniel De Graaf National Security Agency
Quoted 7 lines · Daniel De Graaf
When booting 2.6.37 (from kernel.org) under Xen 4.1, there are apparently issues with timer interrupts being delivered to the dom0. Repeatedly causing an interrupt (for example, the ACPI power button) will allow the system to boot, as does adding "clocksource=jiffies" to the kernel command line. This is only present under Xen, not when booting the same kernel on real hardware.
Quoted 6 lines
When boot with clocksource=jiffies, the system will sometimes freeze for about 30 seconds and then continue; however, this could be related to kernel debugging that I have enabled.
The only clock-related message in dmesg is:
[ 153.483813] Clocksource tsc unstable (delta = -77312555973 ns)
I see it too.
Quoted 7 lines
/sys/devices/system/clocksource/clocksource0/available_clocksource:
xen jiffies tscI can attach kernel config or other information as required. I have observed this on at least two platforms; the 2.6.32.x xen kernels do not exhibit this behavior.
I think we are just missing some of the Xen time code that is in 2.6.32 but has not been ported over to 2.6.37. I don't remember the name of the patches thought..
Quoted 6 lines · Daniel De Graaf
When booting 2.6.37 (from kernel.org) under Xen 4.1, there are apparently issues with timer interrupts being delivered to the dom0. Repeatedly causing an interrupt (for example, the ACPI power button) will allow the system to boot, as does adding "clocksource=jiffies" to the kernel command line. This is only present under Xen, not when booting the same kernel on real hardware.
Ah, yes. This is from the cpuidle stuff, I think. Does booting with "idle=halt" work?
Quoted 5 lines
When boot with clocksource=jiffies, the system will sometimes freeze for about 30 seconds and then continue; however, this could be related to kernel debugging that I have enabled.
The only clock-related message in dmesg is:
Quoted 9 lines
[ 153.483813] Clocksource tsc unstable (delta = -77312555973 ns)
/sys/devices/system/clocksource/clocksource0/available_clocksource:
xen jiffies tscI can attach kernel config or other information as required. I have observed this on at least two platforms; the 2.6.32.x xen kernels do not exhibit this behavior.
J
Quoted 11 lines · Jeremy Fitzhardinge
Quoted 6 lines · Daniel De Graaf
When booting 2.6.37 (from kernel.org) under Xen 4.1, there are apparently issues with timer interrupts being delivered to the dom0. Repeatedly causing an interrupt (for example, the ACPI power button) will allow the system to boot, as does adding "clocksource=jiffies" to the kernel command line. This is only present under Xen, not when booting the same kernel on real hardware.
Ah, yes. This is from the cpuidle stuff, I think. Does booting with "idle=halt" work?
Yes, clocksource=xen idle=halt works.
Quoted 14 lines
Quoted 14 lines
When boot with clocksource=jiffies, the system will sometimes freeze for about 30 seconds and then continue; however, this could be related to kernel debugging that I have enabled.
The only clock-related message in dmesg is:
[ 153.483813] Clocksource tsc unstable (delta = -77312555973 ns)
/sys/devices/system/clocksource/clocksource0/available_clocksource:
xen jiffies tscI can attach kernel config or other information as required. I have observed this on at least two platforms; the 2.6.32.x xen kernels do not exhibit this behavior.
Quoted 9 lines · Daniel De Graaf
Quoted 8 lines · Jeremy Fitzhardinge
Quoted 6 lines · Daniel De Graaf
When booting 2.6.37 (from kernel.org) under Xen 4.1, there are apparently issues with timer interrupts being delivered to the dom0. Repeatedly causing an interrupt (for example, the ACPI power button) will allow the system to boot, as does adding "clocksource=jiffies" to the kernel command line. This is only present under Xen, not when booting the same kernel on real hardware.
Quoted 5 lines
Quoted 3 lines
Ah, yes. This is from the cpuidle stuff, I think. Does booting with "idle=halt" work?
Yes, clocksource=xen idle=halt works.
I have a testbox that can reproduce this problem.
It seems to be caused by the cpuidle driver that overrides pm_idle unless boot_option_idle_override is set to something other than the default.
This patch fixes the problem for me:
---
arch/x86/xen/setup.c +1 -0
@@ -353,6 +353,7 @@ void __init xen_arch_setup(void) boot_cpu_data.hlt_works_ok =1 ;#endif pm_idle = default_idle; + boot_option_idle_override =IDLE_HALT ;fiddle_vdso (); }
Quoted 29 lines · Stefano Stabellini
Quoted 9 lines · Daniel De Graaf
Quoted 8 lines · Jeremy Fitzhardinge
Quoted 6 lines · Daniel De Graaf
When booting 2.6.37 (from kernel.org) under Xen 4.1, there are apparently issues with timer interrupts being delivered to the dom0. Repeatedly causing an interrupt (for example, the ACPI power button) will allow the system to boot, as does adding "clocksource=jiffies" to the kernel command line. This is only present under Xen, not when booting the same kernel on real hardware.
Quoted 5 lines
Quoted 3 lines
Ah, yes. This is from the cpuidle stuff, I think. Does booting with "idle=halt" work?
Yes, clocksource=xen idle=halt works.
I have a testbox that can reproduce this problem.
It seems to be caused by the cpuidle driver that overridespm_idleunlessboot_option_idle_overrideis set to something other than the default.
This patch fixes the problem for me:---
arch/x86/xen/setup.c +0
-0
arch/x86/xen/setup.c void __init xen_arch_setup(void) · line 356
Quoted 4 lines
arch/x86/xen/setup.c +1
-0@@ -353,6 +353,7 @@ void __init xen_arch_setup(void) boot_cpu_data.hlt_works_ok =1 ;#endif pm_idle = default_idle; + boot_option_idle_override =IDLE_HALT ;
Is this how 2.6.32 did it? Or was there no cpuidle driver in 2.6.32 so we never had tried this? With this being overwridden to HALT does that mean the hypervisor cycles through the Cx states? What about using MWAIT instead? How does this impact AMD platforms?
Quoted 8 lines
arch/x86/xen/setup.c +0
-0fiddle_vdso (); }_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 2 lines · Konrad Rzeszutek Wilk
Is this how 2.6.32 did it? Or was there no cpuidle driver in 2.6.32 so we never had tried this?
CPUIDLE is new.
Quoted 3 lines
With this being overwridden to HALT does that
mean the hypervisor cycles through the Cx states? What about using MWAIT instead? How does this impact AMD platforms?
"halt" in this case is the safe_halt pvop, so it ends up going into the appropriate hypercall.
J