Patching until the COWs come home (part 1)
Patching until the COWs come home (part 1)
Posted Mar 22, 2021 19:22 UTC (Mon) by nix (subscriber, #2304)Parent article: Patching until the COWs come home (part 1)
It's definitely a problem because it doesn't match the user's mental model of how fork() is supposed to work. It's clear that either COW must be broken in this case or a mapping must be retained (or the refcounts split into per-mm versions, which seems likely to be far more expensive). The conceptually ideal approach would have everything act just like normal data, i.e. recognise things like vmsplice references *as* references so you don't need to specially break COW early for them -- but this seems likely to be viciously complex and of only minor benefit. Of course, hunting down every single way a reference can be taken by a child and arranging to COW-break on all of them seems likely to be a nightmarish game of whack-a-mole too...