Reduce the maximum KVA reserved for swap meta structures from 70 to 32 MB.
Reduce the swap meta calculation by a factor of 2, it's still massive overkill. X-MFC after: immediately
This commit is contained in:
parent
e0444818b2
commit
ec61f55d42
@ -109,15 +109,17 @@
|
||||
#define KSTACK_GUARD /* compile in the kstack guard page */
|
||||
|
||||
/*
|
||||
* Ceiling on amount of swblock kva space.
|
||||
* Ceiling on amount of swblock kva space, can be changed via
|
||||
* the kern.maxswzone /boot/loader.conf variable.
|
||||
*/
|
||||
#ifndef VM_SWZONE_SIZE_MAX
|
||||
#define VM_SWZONE_SIZE_MAX (70 * 1024 * 1024)
|
||||
#define VM_SWZONE_SIZE_MAX (32 * 1024 * 1024)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Ceiling on size of buffer cache (really only effects write queueing,
|
||||
* the VM page cache is not effected).
|
||||
* the VM page cache is not effected), can be changed via
|
||||
* the kern.maxbcache /boot/loader.conf variable.
|
||||
*/
|
||||
#ifndef VM_BCACHE_SIZE_MAX
|
||||
#define VM_BCACHE_SIZE_MAX (200 * 1024 * 1024)
|
||||
|
@ -314,9 +314,9 @@ swap_pager_swap_init()
|
||||
* Initialize our zone. Right now I'm just guessing on the number
|
||||
* we need based on the number of pages in the system. Each swblock
|
||||
* can hold 16 pages, so this is probably overkill. This reservation
|
||||
* is typically limited to around 70MB by default.
|
||||
* is typically limited to around 32MB by default.
|
||||
*/
|
||||
n = cnt.v_page_count;
|
||||
n = cnt.v_page_count / 2;
|
||||
if (maxswzone && n > maxswzone / sizeof(struct swblock))
|
||||
n = maxswzone / sizeof(struct swblock);
|
||||
n2 = n;
|
||||
|
Loading…
Reference in New Issue
Block a user