Thread (47 messages) 47 messages, 7 authors, 2021-10-29

Re: [PATCH v8 00/17] gfs2: Fix mmap + page fault deadlocks

From: Andreas Gruenbacher <agruenba@redhat.com>
Date: 2021-10-25 19:01:00
Also in: linux-fsdevel, lkml, ocfs2-devel

On Fri, Oct 22, 2021 at 9:23 PM Linus Torvalds
[off-list ref] wrote:
On Fri, Oct 22, 2021 at 8:06 AM Catalin Marinas [off-list ref] wrote:
quoted
Probing only the first byte(s) in fault_in() would be ideal, no need to
go through all filesystems and try to change the uaccess/probing order.
Let's try that. Or rather: probing just the first page - since there
are users like that btrfs ioctl, and the direct-io path.
For direct I/O, we actually only want to trigger page fault-in so that
we can grab page references with bio_iov_iter_get_pages. Probing for
sub-page error domains will only slow things down. If we hit -EFAULT
during the actual copy-in or copy-out, we know that the error can't be
page fault related. Similarly, in the buffered I/O case, we only
really care about the next byte, so any probing beyond that is
unnecessary.

So maybe we should split the sub-page error domain probing off from
the fault-in functions. Or at least add an argument to the fault-in
functions that specifies the amount of memory to probe.

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