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.