Re: [PATCH v6 19/21] timer: Implement the hierarchical pull model

From: Frederic Weisbecker
Date: Tue May 16 2023 - 05:26:10 EST


Le Mon, May 15, 2023 at 02:41:33PM +0200, Sebastian Siewior a écrit :
> On 2023-05-15 12:50:25 [+0200], Anna-Maria Behnsen wrote:
> > As menitoned in the reply last week to Frederics objections regarding the
> > locking asymmetry, I would like to keep it to make the locking region of
> > timer base locks as small as possible and to prevent holding up to five
> > locks during the walk.
>
> This looks okay. I wouldn't suggest to hold the timer_base::lock or
> tmigr_cpu::lock longer than needed. Both can be acquired independently
> cross CPU and have explicit locking order. So it is fine.


LOCK(A)
LOCK(B)
UNLOCK(A)
UNLOCK(B)


Cross rhymes aren't pretty in locking. They don't make the review smooth
but yeah it's not incorrect either. And since I don't have a better way to
propose...

>
> > Thanks,
> >
> > Anna-Maria
>
> Sebastian