On Tue, Apr 08, 2025 at 12:38:12PM +0800, Tiwei Bie wrote:
On 2025/4/8 02:12, Sasha Levin wrote:
From: Tiwei Bie <tiwei....@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....@antgroup.com>
Link: https://patch.msgid.link/20250315161910.4082396-2-tiwei....@antgroup.com
Signed-off-by: Johannes Berg <johannes.b...@intel.com>
Signed-off-by: Sasha Levin <sas...@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-92f5b04b8...@antgroup.com/
Dropped, thanks.
--
Thanks,
Sasha