Re: [PATCH] mm: Make swapoff interruptible when unusing mms/shmem

From: Chris Down

Date: Mon Oct 26 2026 - 10:04:32 EST


Hi Baolin, Andrew,

Sorry, I missed this.

Yes, I think -ERESTARTSYS is appropriate here. I used -EINTR to match the existing signal exit in try_to_unuse(), but that also means a freezer induced interruption becomes visible to userspace after thaw. Let me use ERESTARTSYS instead.

Re: Andrew's earlier questions: before b56a2d8af914, try_to_unuse() checked for signals between swap entries, rather than after walking an entire mm. Individual I/O waits can still delay it but certainly it's a lot better than this situation.

So yes, I think this probably warrants a stable backport given the suspend timeout is reproducible and it's a reasonable usability regression even though it has been present for a long time. I'll add Cc: stable for v2.

Thanks!