More on this subject:

 - MEMORY_OBJECT_COPY_DELAY is actually needed to be able to provide
private mmaps without copying the entire object at once.
 - This attribute only changes the behavior of
vm_object_copy_strategically, between doing a delayed copy
(COPY_DELAY) or copying the pages for real (COPY_NONE).
 - A single object can be accessed with both strategies without conflicts.

Nowadays, the copy strategy is decided per-object, but I think the
desired type of access to an object should also be considered. For
instance, the operation generated by vm_copy should almost always use
COPY_NONE, while vm_map, when doing things such as providing a private
map, should use COPY_DELAY.

I'm testing a patch which does this distinction. I'll post the results.

Reply via email to