lkml.org 
[lkml]   [2023]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v8 09/25] timer: Split out get next timer functionality
Date
On Wed, Oct 04 2023 at 14:34, Anna-Maria Behnsen wrote:
> Split out get next timer functionality to make it reusable in other
> places. Thereby the order of getting the next expiry, forwarding the base
> clock and mark timer bases as idle, is changed. This change of order
> shouldn't have any impact, as nothing inside the function relies on the
> idle value or the updated timer base clock.

This interestingly corrects the issue of patch 8/25 because

> + nextevt = __get_next_timer_interrupt(basej, base);
>
> /*
> * We have a fresh next event. Check whether we can forward the
> @@ -1952,14 +1968,10 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem)
> */
> base->is_idle = time_after(nextevt, basej + 1);

base->is_idle is now handled in the correct order vs. the nextevt evaluation.

> - if (base->timers_pending) {
> - /* If we missed a tick already, force 0 delta */
> - if (time_before(nextevt, basej))
> - nextevt = basej;
> - expires = basem + (u64)(nextevt - basej) * TICK_NSEC;
> - }
> raw_spin_unlock(&base->lock);

Thanks,

tglx

\
 
 \ /
  Last update: 2023-10-10 00:17    [W:0.480 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site