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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Dec 17, 2021, at 3:29 PM, David Hildenbrand <david@xxxxxxxxxx> wrote:
> 
> On 17.12.21 23:58, Linus Torvalds wrote:
>> 
>> 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.





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux