Re: [PATCH v2] tick/broadcast: Do not set oneshot_mask except was_periodic was true

From: Frederic Weisbecker
Date: Thu May 04 2023 - 03:51:29 EST


On Thu, May 04, 2023 at 12:53:52AM +0200, Thomas Gleixner wrote:
> On Thu, May 04 2023 at 00:27, Frederic Weisbecker wrote:
>
> > On Tue, May 02, 2023 at 02:38:57PM +0200, Thomas Gleixner wrote:
> >> Updated patch below.
> >>
> >> Thanks,
> >
> > Looks good from my layperson's eyes, just a doubt about a comment below:
> >
> >> +
> >> + /*
> >> + * When switching from periodic to oneshot mode arm the broadcast
> >> + * device for the next tick.
> >> + *
> >> + * If the broadcast device has been replaced in oneshot mode and
> >> + * the oneshot broadcast mask is not empty, then arm it to expire
> >> + * immediately in order to reevaluate the next expiring timer.
> >> + * nexttick is 0 and therefore in the past which will cause the
> >
> > Is nexttick really in the past? It's set to tick_next_period...
>
> Only in the non-replacement, i.e. the 'from_periodic' codepath, no?

Bah, missed that, right.

A shy Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>

Thanks!