Re: [PATCH v1 06/11] mm: support GUP-triggered unsharing via FAULT_FLAG_UNSHARE (!hugetlb)

From
Jason Gunthorpe <jgg@nvidia.com>
Date
2021-12-18 00:50:46
Also in
linux-kselftest, linux-mm, lkml
Reply to
Nadav Amit, 2021-12-17
On Fri, Dec 17, 2021 at 09:15:45PM +0000, Nadav Amit wrote:
I think that there is an assumption that once a page is COW-broken,
it would never have another write-fault that might lead to COW
breaking later.
Yes, that is what Linus has been explaining, AFAICT
AFAIK at least after userfaultfd-WP followed by
userfaultfd-write-unprotect a page might be write-protected and
go through do_wp_page() a second time to be COW-broken again. In
such case, I think the FOLL_FORCE|FOLL_WRITE would not help.
Right, and this is a good reason why refcount is running into trouble,
it COW's too much in cases like that because userfaultfd-WP doesn't
align to the first assumption.

Jason
Thread (137 messages) 137 messages, 11 authors, last reply 2022-01-04
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help