Conversation

This Tweet was deleted by the Tweet author. Learn more
This Tweet was deleted by the Tweet author. Learn more
This Tweet was deleted by the Tweet author. Learn more
This Tweet was deleted by the Tweet author. Learn more
I understand CoW and overcommit! But then you brought in guard pages as a benefit of overcommit, and my searches on guard pages don't yield anything that requires CoW.
This Tweet was deleted by the Tweet author. Learn more
If we didn't have fork, we would very rarely encounter the situation "I need to CoW this vast amount of memory though I'll probably modify very little of it", and so we wouldn't need overcommit.
This Tweet was deleted by the Tweet author. Learn more
Yep I'm not against sharing memory, or even CoW. It's specifically overcommit that I hate, and it's only necessary because fork is such an awful bodge.
1
Can also still reserve huge amounts of address space without overcommit as long as you map it as PROT_NONE or PROT_READ initially. Works fine. If you don't directly control how it gets used, you could set up userfaultfd to catch faults and make it PROT_WRITE|PROT_READ as needed.
1
1
Show replies