[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230516093715.cE8LUUcB@linutronix.de>
Date: Tue, 16 May 2023 11:37:15 +0200
From: Sebastian Siewior <bigeasy@...utronix.de>
To: Frederic Weisbecker <frederic@...nel.org>
Cc: Anna-Maria Behnsen <anna-maria@...utronix.de>,
linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
John Stultz <jstultz@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Eric Dumazet <edumazet@...gle.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
Arjan van de Ven <arjan@...radead.org>,
"Paul E . McKenney" <paulmck@...nel.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Rik van Riel <riel@...riel.com>,
Steven Rostedt <rostedt@...dmis.org>,
Giovanni Gherdovich <ggherdovich@...e.cz>,
Lukasz Luba <lukasz.luba@....com>,
"Gautham R . Shenoy" <gautham.shenoy@....com>
Subject: Re: [PATCH v6 19/21] timer: Implement the hierarchical pull model
On 2023-05-16 11:24:51 [+0200], Frederic Weisbecker wrote:
> > 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...
tmigr_cpu::lock is required longer than timer_base::lock. You can't
acquire tmigr_cpu::lock -> timer_base::lock due to lock ordering.
So you follow the lock order, acquire what needed, drop everything else
to lower lock contention for others.
> > > Thanks,
> > >
> > > Anna-Maria
Sebastian
Powered by blists - more mailing lists