Re: [PATCH] timers: Recalculate next timer interrupt only when necessary

From: Frederic Weisbecker
Date: Thu Jul 23 2020 - 10:45:50 EST


On Thu, Jul 23, 2020 at 03:53:32PM +0200, Thomas Gleixner wrote:
> Frederic Weisbecker <frederic@xxxxxxxxxx> writes:
> >
> > Since recalculating the next_expiry isn't a free operation, especially
> > when we must climb up the last wheel level to find out that no timer
> > has
>
> I'm climbing stairs or mountains :)

Arguably, climbing a wheel can be a never ending story :)

>
> > been enqueued at all, lets reuse the next expiry cache when it is
> > known
>
> lets? Come on, the changelog is about facts not what we might do.

Also since you applied the last patchset I have tried to quit using "we"
in the changelog and use "the code" as a subject or even the passive form.
But reading above, I did it again.

Too many habits :))

>
> > unsigned long clk;
> > unsigned long next_expiry;
> > + bool next_expiry_recalc;
> > unsigned int cpu;
> > bool is_idle;
>
> Care to stare at the output of
>
> pahole -C timer_base kernel/time/timer.o
>
> before and after?

Ah right, I'll move the bool together.

Thanks.