[PATCH AUTOSEL 6.14 26/31] um: Rewrite the sigio workaround based on epoll and tgkill
Tiwei Bie
tiwei.btw at antgroup.com
Mon Apr 7 21:36:17 PDT 2025
On 2025/4/8 02:10, Sasha Levin wrote:
> From: Tiwei Bie <tiwei.btw at antgroup.com>
>
> [ Upstream commit 33c9da5dfb18c2ff5a88d01aca2cf253cd0ac3bc ]
>
> 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 at antgroup.com>
> Link: https://patch.msgid.link/20250315161910.4082396-2-tiwei.btw@antgroup.com
> Signed-off-by: Johannes Berg <johannes.berg at intel.com>
> Signed-off-by: Sasha Levin <sashal at kernel.org>
> ---
> arch/um/drivers/random.c | 2 +-
> arch/um/drivers/rtc_user.c | 2 +-
> arch/um/include/shared/os.h | 2 +-
> arch/um/include/shared/sigio.h | 1 -
> arch/um/kernel/sigio.c | 26 ---
> arch/um/os-Linux/sigio.c | 330 +++++----------------------------
> 6 files changed, 47 insertions(+), 316 deletions(-)
Please drop this patch. Thanks! Details can be found here:
https://lore.kernel.org/linux-um/ffa0b6af-523d-4e3e-9952-92f5b04b82b3@antgroup.com/
Regards,
Tiwei
More information about the linux-um
mailing list