Re: Do we need to unrevert "fs: do not prefault sys_write() user buffer pages"?
From: Matthew Wilcox <willy@infradead.org>
Date: 2021-06-22 18:09:18
Also in:
linux-ext4, linux-mm, lkml
From: Matthew Wilcox <willy@infradead.org>
Date: 2021-06-22 18:09:18
Also in:
linux-ext4, linux-mm, lkml
On Tue, Jun 22, 2021 at 06:55:33PM +0100, David Howells wrote:
Linus Torvalds [off-list ref] wrote:quoted
End result: doing the fault_in_readable "unnecessarily" at the beginning is likely the better optimization. It's basically free when it's not necessary, and it avoids an extra fault (and extra lock/unlock and retry) when it does end up faulting pages in.It may also cause the read in to happen in the background whilst write_begin is being done.
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.