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

From: Michal Hocko

Date: Fri Jul 10 2026 - 02:27:54 EST


On Fri 10-07-26 11:29:25, Richard Chang wrote:
> Hi Michal,
>
> On Thu, Jul 9, 2026 at 8:06 PM Michal Hocko <mhocko@xxxxxxxx> wrote:
> >
> > The changelog doesn't explain whether this is MGRLU specific problem as
> > the fix is MGRLU specific AFAICS.
> >
> I will prepare the v3 changelog update. Thanks.
>
> > Also do I get it right that freezing a task while doing the pro-active
> > reclaim will force EINTR early return even if no real signal was
> > delivered to the task?
> >
> Yes, that is correct.
> The PM freezer ( freeze_task() ) calls fake_signal_wake_up(), which
> sets TIF_SIGPENDING on the target task.
> Returning -EINTR when checking by signal_pending(current) is already
> the existing behavior of user_proactive_reclaim().
> This patch does not change the behavior, it just allows the task to
> exit the inner loop quickly.

I believe this is a wrong behavior. Freezer should be invisible from the
userspace POV. Your patch makes the pre-existing problem much more
visible. I believe we need a slightly different approach. Should we
try_to_freeze in well defined places in the reclaim and turn
user_proactive_reclaim to fatal_signal_pending?

--
Michal Hocko
SUSE Labs