Re: [PATCH v2] mm: vmscan: abort proactive reclaim early when freezing for suspend

From: Richard Chang

Date: Wed Jul 15 2026 - 03:59:24 EST


Hi Michal,
Thanks for the patch.
Yes, inserting try_to_freeze() at that point carries low risk.
However, there are still a few issues:

1. As I understand it, fatal_signal_pending() only checks for SIGKILL
(via sigismember(..., SIGKILL)).
It does not return true for SIGINT (Ctrl+C), even if the signal is
unhandled and will eventually terminate the task.
If we switch to fatal_signal_pending, a large proactive reclaim task
will continue reclaiming until the loop finishes.

2. try_to_freeze() does not clear the TIF_SIGPENDING flag. When the
task resumes and continues the user_proactive_reclaim() loop, the next
iteration of the inner loop will immediately abort.

I think it requires a more complex implementation in the outer loop. Eg:
if (signal_pending(current)) {
if (freezing(current)) {
try_to_freeze();
// After thawing, clear the fake signal TIF_SIGPENDING flag
...
} else {
// real signal like SIGINT
return -EINTR;
}
}