While we don't want to skip calling update_idle_stats(), arrange for it to not increment the overall time spent in the state we didn't really enter.
Signed-off-by: Jan Beulich <jbeul...@suse.com> --- RFC: Arguably more of what follows could be moved into the if() - thoughts? --- v2: New. --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -861,9 +861,11 @@ static void mwait_idle(void) mwait_idle_with_hints(cx->address, MWAIT_ECX_INTERRUPT_BREAK); local_irq_disable(); - } - after = alternative_call(cpuidle_get_tick); + after = alternative_call(cpuidle_get_tick); + } + else + before = after = alternative_call(cpuidle_get_tick); cstate_restore_tsc(); trace_exit_reason(irq_traced);