Linux-GPIO Archive on lore.kernel.org
 help / color / Atom feed
* gpiolib gpio_chrdev_release duration is about 30 ms
@ 2020-07-17 12:56 Maxim Kochetkov
  2020-07-17 13:37 ` Linus Walleij
  0 siblings, 1 reply; 11+ messages in thread
From: Maxim Kochetkov @ 2020-07-17 12:56 UTC (permalink / raw)
  To: linux-gpio; +Cc: bgolaszewski, linus.walleij

Hi.

I'm using libgpiod in userspace.
I have 6 gpiochip's on my board.
gpiod_line_find takes about 300ms to find GPIO line.

gpiod_line_find calls gpiod_foreach_chip
then gpiod_chip_iter_next
then gpiod_chip_close then close(chip->fd)
then we are going to kernel gpiolib gpio_chrdev_release
then atomic_notifier_chain_unregister
then synchronize_rcu()

synchronize_rcu takes about 30 ms (6*30ms=280ms)

I tried to remove synchronize_rcu from atomic_notifier_chain_unregister 
and gpiod_line_find takes about 2ms now.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, back to index

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-07-25  3:52             ` Kent Gibson
2020-07-26 11:04               ` Bartosz Golaszewski
2020-07-26 22:32               ` Linus Walleij

Linux-GPIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-gpio/0 linux-gpio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-gpio linux-gpio/ https://lore.kernel.org/linux-gpio \
		linux-gpio@vger.kernel.org
	public-inbox-index linux-gpio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-gpio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git