lkml.org 
[lkml]   [2021]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Do we need to unrevert "fs: do not prefault sys_write() user buffer pages"?
On Tue, Jun 22, 2021 at 11:07:56AM -0700, Linus Torvalds wrote:
> On Tue, Jun 22, 2021 at 11:05 AM Matthew Wilcox <willy@infradead.org> wrote:
> >
> > Huh? Last I checked, the fault_in_readable actually read a byte from
> > the page. It has to wait for the read to complete before that can
> > happen.
>
> Yeah, we don't have any kind of async fault-in model.
>
> I'm not sure how that would even look. I don't think it would
> necessarily be *impossible* (special marker in the exception table to
> let the fault code know that this is a "prepare" fault), but it would
> be pretty challenging.

It wouldn't be _that_ bad necessarily. filemap_fault:

page = find_get_page(mapping, offset);
...
} else if (!page) {
fpin = do_sync_mmap_readahead(vmf);

... and we could return at that point if the flag was set. There'd be
some more details to fill in (if there's a !uptodate page in the page
cache, don't wait for it), but it might not be too bad.

\
 
 \ /
  Last update: 2021-06-22 20:24    [W:0.258 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site