[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RFC: disable HPET legacy mode after timer check
Hi, I have been recently looking into getting S0ix working on Xen [1]. Thanks to a tip from Andrew I found that the HPET legacy mode was preventing my test system from reaching a package C-state lower than PC7 and thereby also preventing S0ix residency. For testing I simply modified check_timer() to disable it again after it checked the timer irq: --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1966,6 +1969,8 @@ static void __init check_timer(void) if ( timer_irq_works() ) { + hpet_disable_legacy_replacement_mode(); local_irq_restore(flags); return; } With this [2] I'm able to reach S0ix residency for some time and for short periods the systems power consumption goes down to the same level as with native Linux! It reaches low power states only for a fraction of the suspend to idle time, so something still makes the CPU/chipset think it should leave the low power mode, but that's another topic. I tried to understand how all the timer code interacts with disabling the legacy mode. I think it only would break cpuidle if X86_FEATURE_ARAT is not available (Which is available on my test system and indeed I didn't run into obvious breakage). Is this (disabled PIT && !ARAT) a configuration that exists (and needs to be supported)? Did I miss something else? (Very much possible, given that this is way above my existing experience with X86 and Xen internals.) Simon [1]: https://lore.kernel.org/xen-devel/9051e484-b128-715a-9253-48af8e47bb9d@xxxxxxxxxxxxxxxxxxxxxx/ [2]: Plus [3] and some hack to have mwait-idle on Tiger Lake. [3]: https://lore.kernel.org/xen-devel/20230313134102.3157-1-simon@xxxxxxxxxxxxxxxxxxxxxx/ Attachment:
OpenPGP_signature
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |