Date: Tue, 14 Aug 2012 17:01:21 +0000 (UTC) From: Dag-Erling Smørgrav <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r239255 - in head/sys: amd64/include boot/common i386/include Message-ID: <201208141701.q7EH1LVD023603@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Tue Aug 14 17:01:21 2012 New Revision: 239255 URL: http://svn.freebsd.org/changeset/base/239255 Log: As discussed on -current, remove the hardcoded default maxswzone. MFC after: 3 weeks Modified: head/sys/amd64/include/param.h head/sys/boot/common/loader.8 head/sys/i386/include/param.h Modified: head/sys/amd64/include/param.h ============================================================================== --- head/sys/amd64/include/param.h Tue Aug 14 14:07:34 2012 (r239254) +++ head/sys/amd64/include/param.h Tue Aug 14 17:01:21 2012 (r239255) @@ -123,14 +123,6 @@ #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ /* - * 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 (32 * 1024 * 1024) -#endif - -/* * Mach derived conversion macros */ #define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) Modified: head/sys/boot/common/loader.8 ============================================================================== --- head/sys/boot/common/loader.8 Tue Aug 14 14:07:34 2012 (r239254) +++ head/sys/boot/common/loader.8 Tue Aug 14 17:01:21 2012 (r239255) @@ -613,17 +613,26 @@ Not all architectures use such buffers; for details. .It Va kern.maxswzone Limits the amount of KVM to be used to hold swap -meta information, which directly governs the -maximum amount of swap the system can support. -This value is specified in bytes of KVA space -and defaults to 32MBytes on i386 and amd64. -Care should be taken -to not reduce this value such that the actual -amount of configured swap exceeds 1/2 the -kernel-supported swap. -The default of 32MB allows -the kernel to support a maximum of ~7GB of swap. -Only change +metadata, which directly governs the +maximum amount of swap the system can support, +at the rate of approximately 200 MB of swap space +per 1 MB of metadata. +This value is specified in bytes of KVA space. +If no value is provided, the system allocates +enough memory to handle an amount of swap +that corresponds to eight times the amount of +physical memory present in the system. +.Pp +Note that swap metadata can be fragmented, +which means that the system can run out of +space before it reaches the theoretical limit. +Therefore, care should be taken to not configure +more swap than approximately half of the +theoretical maximum. +.Pp +Running out of space for swap metadata can leave +the system in an unrecoverable state. +Therefore, you should only change this parameter if you need to greatly extend the KVM reservation for other resources such as the buffer cache or Modified: head/sys/i386/include/param.h ============================================================================== --- head/sys/i386/include/param.h Tue Aug 14 14:07:34 2012 (r239254) +++ head/sys/i386/include/param.h Tue Aug 14 17:01:21 2012 (r239255) @@ -123,14 +123,6 @@ #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ /* - * 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 (32 * 1024 * 1024) -#endif - -/* * Ceiling on size of buffer cache (really only effects write queueing, * the VM page cache is not effected), can be changed via * the kern.maxbcache /boot/loader.conf variable.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208141701.q7EH1LVD023603>