um: Rewrite the sigio workaround based on epoll and tgkill
authorTiwei Bie <tiwei.btw@antgroup.com>
Sat, 15 Mar 2025 16:19:08 +0000 (00:19 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 20 Mar 2025 08:28:44 +0000 (09:28 +0100)
commit33c9da5dfb18c2ff5a88d01aca2cf253cd0ac3bc
tree0ef75011ee477633de8c882d696314eca6fffefb
parent69f52573c24de9d2919f83e3b3b396a09118b7c4
um: Rewrite the sigio workaround based on epoll and tgkill

The existing sigio workaround implementation removes FDs from the
poll when events are triggered, requiring users to re-add them via
add_sigio_fd() after processing. This introduces a potential race
condition between FD removal in write_sigio_thread() and next_poll
update in __add_sigio_fd(), and is inefficient due to frequent FD
removal and re-addition. Rewrite the implementation based on epoll
and tgkill for improved efficiency and reliability.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20250315161910.4082396-2-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/drivers/random.c
arch/um/drivers/rtc_user.c
arch/um/include/shared/os.h
arch/um/include/shared/sigio.h
arch/um/kernel/sigio.c
arch/um/os-Linux/sigio.c