linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Kent Gibson <warthog618@gmail.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Maxim Kochetkov <fido_max@inbox.ru>
Subject: Re: gpiolib gpio_chrdev_release duration is about 30 ms
Date: Fri, 24 Jul 2020 21:36:03 +0200	[thread overview]
Message-ID: <CAMRc=MdSMMd5SN2HeicgdHkKsBTHTB_5Cn0cYG5EPggn0Mcukg@mail.gmail.com> (raw)
In-Reply-To: <7a22761d-c930-3597-6bf1-c799f70a47f8@inbox.ru>

On Mon, Jul 20, 2020 at 10:14 AM Maxim Kochetkov <fido_max@inbox.ru> wrote:
>
> It works fine with this patch. Thank you so much!
>
> 18.07.2020 07:25, Kent Gibson пишет:
> > On Fri, Jul 17, 2020 at 06:07:04PM +0300, Andy Shevchenko wrote:
> >> On Fri, Jul 17, 2020 at 5:17 PM Maxim Kochetkov <fido_max@inbox.ru> wrote:
> >>>
> >>> I need a small userspace program to do some GPIO magic to communicate
> >>> other hardware like devmem. This program takes about 2,5 seconds just to
> >>> find GPIO lines by name.
> >>>
> >>> replacing synchronize_rcu to synchronize_rcu_expedited in
> >>> atomic_notifier_chain_unregister gives the same boost as removing
> >>> synchronize_rcu
> >>
> >> Have you tried to replace an atomic notifier call with a regular one?
> >> IIRC it's still not clear why atomic is used there.
> >>
> >
> > Indeed, I recently submitted a patch to switch the
> > atomic_notifier_call_chain to blocking_notifier_call_chain, as some of
> > the chained calls can sleep.
> > Not sure if that is related, or if the change would make this case better
> > or worse, but it would be interesting to find out.
> > The patch is in the current gpio/devel, btw.
> >
> > Cheers,
> > Kent.
> >

Linus,

I think we should consider submitting this patch for stable then
because this slow-down was affects previously existing use-cases.

Bartosz

  reply	other threads:[~2020-07-24 19:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 12:56 gpiolib gpio_chrdev_release duration is about 30 ms Maxim Kochetkov
2020-07-17 13:37 ` Linus Walleij
2020-07-17 13:44   ` Maxim Kochetkov
2020-07-17 14:17   ` Maxim Kochetkov
2020-07-17 15:07     ` Andy Shevchenko
2020-07-18  4:25       ` Kent Gibson
2020-07-20  8:14         ` Maxim Kochetkov
2020-07-24 19:36           ` Bartosz Golaszewski [this message]
2020-07-25  3:52             ` Kent Gibson
2020-07-26 11:04               ` Bartosz Golaszewski
2020-07-26 22:32               ` Linus Walleij

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='CAMRc=MdSMMd5SN2HeicgdHkKsBTHTB_5Cn0cYG5EPggn0Mcukg@mail.gmail.com' \
    --to=brgl@bgdev.pl \
    --cc=andy.shevchenko@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=fido_max@inbox.ru \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=warthog618@gmail.com \
    /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).