Re: [PATCH v3] mm: vmscan: abort proactive reclaim early when freezing for suspend
From: Oleg Nesterov
Date: Fri Jul 17 2026 - 14:47:47 EST
On 07/17, Richard Chang wrote:
>
> v3: Return -ERESTARTSYS instead of -EINTR in user_proactive_reclaim
Yes, this change LGTM, but ...
> + /*
> + * Return -ERESTARTSYS to allow the freezer to interrupt the
> + * task. The syscall will be transparently restarted upon
> + * resume. Real signals (e.g. SIGINT) will be automatically
> + * converted to -EINTR by the signal layer.
> + */
... the comment looks a bit misleading...
So, if the signal is "real" and has a handler, handle_signal() does
case -ERESTARTSYS:
if (!(ksig->ka.sa.sa_flags & SA_RESTART)) {
regs->ax = -EINTR;
break;
}
fallthrough;
case -ERESTARTNOINTR:
regs->ax = regs->orig_ax;
regs->ip -= 2;
break;
If SA_RESTART is set, the syscall will be restarted after return from
signal handler.
Oleg.