Module Name: src Committed By: chs Date: Sat Dec 7 23:19:08 UTC 2024
Modified Files: src/sys/uvm: uvm_km.c Log Message: kmem: improve behavior when using all of physical memory as kmem On systems where kmem does not need to be limited by kernel virtual space (essentially 64-bit platforms), we currently try to size the "kmem" space to be big enough for all of physical memory to be allocated as kmem, which really means that we will always run short of physical memory before we run out of kernel virtual space. However this does not take into account that uvm_km_va_starved_p() starts reporting that we are low on kmem virtual space when we have used 90% of it, in an attempt to avoid kmem space becoming too fragmented, which means on large memory systems we will still start reacting to being short of virtual space when there is plenty of physical memory still available. Fix this by overallocating the kmem space by a factor of 10/9 so that we always run low on physical memory first, as we want. To generate a diff of this commit: cvs rdiff -u -r1.165 -r1.166 src/sys/uvm/uvm_km.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.