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:32:24
Also in: linux-ext4, linux-fsdevel, lkml

On Tue, Jun 22, 2021 at 11:23 AM David Howells [off-list ref] wrote:
Probably the most obvious way would be to set a flag in task_struct saying
what you're doing and have the point that would otherwise wait for the page to
become unlocked skip to the fault fixup code if the page is locked after
->readahead() has been invoked and the flag is set, then use get_user() in
iov_iter_fault_in_readable().
Yeah, the existing user access exception handling code _almost_
handles it, except for one thing: you'd need to have some way to
distinguish between "prefetch successful" and "fault failed".

And yeah, I guess it could be a flag in task_struct, but at that point
my gag reflex starts acting up.

               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