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

From
Nadav Amit <hidden>
Date
2021-12-17 23:53:25
Also in
linux-kselftest, linux-mm, lkml
Reply to
David Hildenbrand, 2021-12-17
On Dec 17, 2021, at 3:29 PM, David Hildenbrand [off-list ref] wrote:

On 17.12.21 23:58, Linus Torvalds wrote:
quoted
And you can't even do the optimistic case without taking the lock,
because in your world, a COW that optimistically copies in the case of
a race condition is fundamentally *wrong* and buggy. Because in your
world-view, GUP and COW are very different and have different rules,
but you need things to be *exact*, and they aren’t.
I understand the discussion mainly revolves correctness, which is
obviously the most important property, but I would like to mention
that having transient get_page() calls causing unnecessary COWs can
cause hard-to-analyze and hard-to-avoid performance degradation. COW
means a page copy, a TLB flush and potentially a TLB shootdown, which
is the most painful, specifically on VMs.

So I think that any solution should be able to limit the cases/number
of unnecessary COW operations to be minimal.
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