在 2025/8/14 22:37, Peter Zijlstra 写道:
On Thu, Aug 07, 2025 at 08:14:09PM +0800, Zihuan Zhang wrote:
Freeze Window Begins
[process A] - epoll_wait()
│
▼
[process B] - event source (already frozen)
Can we make epoll_wait() TASK_FREEZABLE? AFAICT it doesn't hold any
resources, it just sits there waiting for stuff.
Based on the code, it’s ep_poll() that puts the task into the D state,
most likely due to I/O or lower-level driver behavior. In fs/eventpoll.c:
Line:2097 __set_current_state
<https://elixir.bootlin.com/linux/v6.16/C/ident/__set_current_state>(TASK_INTERRUPTIBLE
<https://elixir.bootlin.com/linux/v6.16/C/ident/TASK_INTERRUPTIBLE>);
Simply changing the task state may not actually address the root cause.
Currently, our approach is to identify tasks that are more likely to
cause such issues and freeze them earlier or later in the process to
avoid conflicts.