Re: [patch 18/39] mm/madvise: check fatal signal pending of target process
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2020-08-15 02:53:31
Also in:
linux-mm
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2020-08-15 02:53:31
Also in:
linux-mm
On Fri, Aug 14, 2020 at 5:31 PM Andrew Morton [off-list ref] wrote:
From: Minchan Kim <minchan@kernel.org> Subject: mm/madvise: check fatal signal pending of target process Bail out to prevent unnecessary CPU overhead if target process has pending fatal signal during (MADV_COLD|MADV_PAGEOUT) operation.
This seems bogus.
Returning -EINTR when *SOMEBODY ELSE* has a signal is crazy talk.
It also seems to be the reason for the previous patches inexplicably
passing in the task pointer.
Finally, it has absolutely no explanations for why this would matter,
and why it's magically and suddenly an issue for process_madvise(),
when in the history of the *real* madvise() this hasn't been an issue
for "current".
I'm dropping the madvise() series.
If the issue is that you can generate a long series or areas with that
iovec, maybe the code should re-consider. Or maybe the signal pending
case should be done there, not passing down an odd task pointer to the
low-level madvise code.
Linus