|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 2/2] xen/x86: ioapic: Bail out from timer_irq_works() as soon as possible
Hi Jan, On 07/09/2023 15:28, Jan Beulich wrote: On 18.08.2023 15:44, Julien Grall wrote:From: Julien Grall <jgrall@xxxxxxxxxx> Currently timer_irq_works() will wait the full 100ms before checking that pit0_ticks has been incremented at least 4 times. However, the bulk of the BIOS/platform should not have a buggy timer. So waiting for the full 100ms is a bit harsh. Rework the logic to only wait until 100ms passed or we saw more than 4 ticks. So now, in the good case, this will reduce the wait time to ~50ms. Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>In principle this is all fine. There's a secondary aspect though which may call for a slight rework of the patch. You are right. I can switch to unsigned int. @@ -1517,19 +1519,25 @@ static int __init timer_irq_works(void)local_save_flags(flags); Skimming through the code, the last call of timer_irq_works() in check_timer() happens after the interrupts masking state have been restored: local_irq_restore(flags); if ( timer_irq_works() ) ...So I think timer_irq_works() can be called with interrupts enabled and therefore we can't use local_irq_disable(). I can see that you don't want to make such an adjustment here. But then I'd prefer if we got away with just a single instance, adjusting the final return statement accordingly (easiest would likely be to go from the value of "msec"). I was thinking to use 'msec > 0' as a condition to determine if the test passed. However, it would consider a failure if it tooks 10ms for the test to pass. I will see if I can rework the loop. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |