Re: [patch 2/8] hrtimer: Force clock_was_set() handling for the HIGHRES=n, NOHZ=y case

Peter Zijlstra
2021-05-12T15:29:28Z

On Tue, Apr 27, 2021 at 10:25:39AM +0200, Thomas Gleixner wrote:
> void clock_was_set(void)
> {
> + if (!hrtimer_hres_active() && !tick_nohz_active)
> + goto out_timerfd;
> +
> /* Retrigger the CPU local events everywhere */
> on_each_cpu(retrigger_next_event, NULL, 1);
> +
> +out_timerfd:
> timerfd_clock_was_set();
> }

Isn't that simpler when written like:

if (hrtimer_hres_active() || tick_nohz_active())
on_each_cpu(retrigger_next_event, NULL, 1);

timerfd_clock_was_set();

?