close on evdev file descriptor slow

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

 



Hi,

when I strace -r the following program

  #include <unistd.h>
  #include <fcntl.h>
  int main()
  {
    int fd = open("/dev/input/mice", O_RDONLY | O_NONBLOCK);
    close(fd);
    write(1, "dummy\n", 6);
  }

I get the following relevant output:

  0.000040 openat(AT_FDCWD, "/dev/input/mice", O_RDONLY|O_NONBLOCK) = 3
  0.000028 close(3)                  = 0
  0.043189 write(1, "dummy\n", 6)    = 6

Why is the close so slow?

Kernel version is 5.4.21.

I'd appreciate if I could be cc'd, since I'm not subscribed to the list.

All the best
Andreas



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux