[PATCH 1/4] eventpoll: mark ep_poll() sleep as freezable

From: Dai Junbing

Date: Wed May 27 2026 - 02:51:36 EST


Tasks blocked in epoll_wait() may be woken during suspend and resume due
to freezer state transitions. This can cause avoidable activity in the
suspend/resume path and add unnecessary power overhead.

Mark the sleep in ep_poll() as freezable so tasks waiting in
epoll_wait()-related paths are not unnecessarily woken by the freezer.

ep_poll() is only used from epoll_wait()-related system call paths, and
the task does not sleep while holding locks that would make freezing
unsafe. This makes the wait state safe to mark as freezable.

Signed-off-by: Dai Junbing <daijunbing@xxxxxxxx>
---
fs/eventpoll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index a3090b446af1..64987b64d72b 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -2010,7 +2010,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
* the same lock on wakeup ep_poll_callback() side, so it
* is safe to avoid an explicit barrier.
*/
- __set_current_state(TASK_INTERRUPTIBLE);
+ __set_current_state(TASK_INTERRUPTIBLE|TASK_FREEZABLE);

/*
* Do the final check under the lock. ep_start/done_scan()
--
2.25.1