[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdY+r_u12iLg2-niMmw1M1Wdtm3yckbby_Wo2L+_BvDuZQ@mail.gmail.com>
Date: Thu, 2 Oct 2025 00:51:17 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Mary Strodl <mstrodl@....rit.edu>
Cc: linux-kernel@...r.kernel.org, brgl@...ev.pl, linux-gpio@...r.kernel.org,
"Paul E. McKenney" <paulmck@...nel.org>, Tzung-Bi Shih <tzungbi@...nel.org>
Subject: Re: [PATCH v2 1/3] gpio: mpsse: use rcu to ensure worker is torn down
On Wed, Oct 1, 2025 at 5:07 PM Mary Strodl <mstrodl@....rit.edu> wrote:
> With that said, I think now that I've found spinlocks work, I could use those
> to gate access to the list everywhere, and use the standard lists api rather
> than the RCU lists api. Obviously teardown of the workers would happen outside
> the spin lock critical section, guarded by a proper mutex.
Yeah RCU is for massive parallelism where you have a lot of (performance
sensitive) readers and a few writers to the struct.
If this isn't performance-sensitive and doesn't have a *lot* of simultaneous
readers, try to use simpler locking mechanisms if you can.
But if performance hampers, RCU is surely the way to go!
Yours,
Linus Walleij
Powered by blists - more mailing lists