Re: gpiolib gpio_chrdev_release duration is about 30 ms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Maxim,

On Fri, Jul 17, 2020 at 2:56 PM Maxim Kochetkov <fido_max@xxxxxxxx> wrote:

> 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.

Interesting! Can you provide some context? Are you just testing because
curious or do you need to meet a design objective?

Did you use ftrace or similar instrumentation to drill down and find
where time is spent?

Yours,
Linus Walleij




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux