Augustin Cavalier b592ba6662 kernel/vm: Set the upper cache's commitment in vm_copy_on_write_area.
Otherwise we may fault later but have no memory to satisfy the fault.

For a compile of HaikuDepot and the mime_db in VMware with -j4, this
seems to increase the wait time on the "available memory" lock from
~0.1s to ~0.5s, and the wait count from ~500 to ~1500 (overall real time
~30s.) Probably we can mitigate that later by doing atomic updates on
sAvailableMemory, at least for releasing memory.

Change-Id: I61abc28d1fc30f7b3d5fd9a2e68e4f4ec960f88d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8677
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-12-13 23:50:35 +00:00
..
2024-11-16 18:26:21 +00:00