linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Mary Strodl <mstrodl@csh.rit.edu>
Cc: linux-kernel@vger.kernel.org, brgl@bgdev.pl,
	linux-gpio@vger.kernel.org,
	 "Paul E. McKenney" <paulmck@kernel.org>,
	Tzung-Bi Shih <tzungbi@kernel.org>
Subject: Re: [PATCH v2 1/3] gpio: mpsse: use rcu to ensure worker is torn down
Date: Thu, 2 Oct 2025 00:51:17 +0200	[thread overview]
Message-ID: <CACRpkdY+r_u12iLg2-niMmw1M1Wdtm3yckbby_Wo2L+_BvDuZQ@mail.gmail.com> (raw)
In-Reply-To: <aN1DlPjbQgzfmpUl@ada.csh.rit.edu>

On Wed, Oct 1, 2025 at 5:07 PM Mary Strodl <mstrodl@csh.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

  reply	other threads:[~2025-10-01 22:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-23 13:33 [PATCH v2 0/3] gpio: mpsse: add support for bryx brik Mary Strodl
2025-09-23 13:33 ` [PATCH v2 1/3] gpio: mpsse: use rcu to ensure worker is torn down Mary Strodl
2025-09-29  8:46   ` Dan Carpenter
2025-09-29  8:48     ` Dan Carpenter
2025-10-02 14:36       ` Mary Strodl
2025-10-01  7:15   ` Linus Walleij
2025-10-01 15:07     ` Mary Strodl
2025-10-01 22:51       ` Linus Walleij [this message]
2025-10-02 14:03       ` Tzung-Bi Shih
2025-10-02 14:34         ` Mary Strodl
2025-10-02 14:02   ` Tzung-Bi Shih
2025-10-02 14:28     ` Mary Strodl
2025-09-23 13:33 ` [PATCH v2 2/3] gpio: mpsse: add quirk support Mary Strodl
2025-09-23 13:33 ` [PATCH v2 3/3] gpio: mpsse: support bryx radio interface kit Mary Strodl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACRpkdY+r_u12iLg2-niMmw1M1Wdtm3yckbby_Wo2L+_BvDuZQ@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mstrodl@csh.rit.edu \
    --cc=paulmck@kernel.org \
    --cc=tzungbi@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).