• Radu Rendec's avatar
    kernfs: Improve kernfs_notify() poll notification latency · 03c0a920
    Radu Rendec authored
    kernfs_notify() does two notifications: poll and fsnotify. Originally,
    both notifications were done from scheduled work context and all that
    kernfs_notify() did was schedule the work.
    
    This patch simply moves the poll notification from the scheduled work
    handler to kernfs_notify(). The fsnotify notification still needs to be
    done from scheduled work context because it can sleep (it needs to lock
    a mutex).
    
    If the poll notification is time critical (the notified thread needs to
    wake as quickly as possible), it's better to do it from kernfs_notify()
    directly. One example is calling sysfs_notify_dirent() from a hardware
    interrupt handler to wake up a thread and handle the interrupt in user
    space.
    Signed-off-by: default avatarRadu Rendec <radu.rendec@gmail.com>
    Acked-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    03c0a920
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
dir.c Loading commit data...
file.c Loading commit data...
inode.c Loading commit data...
kernfs-internal.h Loading commit data...
mount.c Loading commit data...
symlink.c Loading commit data...