Thread (25 messages) 25 messages, 7 authors, 2021-06-22

Re: Do we need to unrevert "fs: do not prefault sys_write() user buffer pages"?

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2021-06-22 18:57:32
Also in: linux-ext4, linux-mm, lkml

On Tue, Jun 22, 2021 at 11:51 AM Nadav Amit [off-list ref] wrote:
Just reminding the alternative (in the RFC that I mentioned before):
a vDSO exception table entry for a memory accessing function in the
vDSO. It then behaves as a sort of MADV_WILLNEED for the faulting
page if an exception is triggered. Unlike MADV_WILLNEED it maps the
page if no IO is needed. It can return through a register whether
the page was present or not.
Yeah, that looks like a user-space equivalent.

And thanks to the vdso, it doesn't need to support all architectures.
Unlike a kernel model would (but yes, a kernel model could then have a
fallback for the non-prefetching synchronous case instead, so I guess
we could just do one architecture at a time).

               Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help