Author: trasz Date: Tue Nov 14 18:07:51 2017 New Revision: 325822 URL: https://svnweb.freebsd.org/changeset/base/325822
Log: MFC r324857: Add OID for the vm.overcommit sysctl. This makes it possible to remove one call to sysctl(2) from jemalloc startup code. (That also requires changes to jemalloc, but I plan to push those to upstream first.) Modified: stable/11/lib/libc/gen/sysctl.3 stable/11/sys/vm/swap_pager.c stable/11/sys/vm/vm_param.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/sysctl.3 ============================================================================== --- stable/11/lib/libc/gen/sysctl.3 Tue Nov 14 18:01:48 2017 (r325821) +++ stable/11/lib/libc/gen/sysctl.3 Tue Nov 14 18:07:51 2017 (r325822) @@ -28,7 +28,7 @@ .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd September 10, 2015 +.Dd October 22, 2017 .Dt SYSCTL 3 .Os .Sh NAME @@ -741,6 +741,7 @@ privilege may change the value. .It Dv VM_V_FREE_TARGET Ta integer Ta yes .It Dv VM_V_INACTIVE_TARGET Ta integer Ta yes .It Dv VM_V_PAGEOUT_FREE_MIN Ta integer Ta yes +.It Dv VM_OVERCOMMIT Ta integer Ta yes .El .Bl -tag -width 6n .It Li VM_LOADAVG @@ -773,6 +774,9 @@ process address space when needed. .It Li VM_V_PAGEOUT_FREE_MIN If the amount of free and cache memory falls below this value, the pageout daemon will enter "memory conserving mode" to avoid deadlock. +.It Li VM_OVERCOMMIT +Overcommit behaviour, as described in +.Xr tuning 7 . .El .Sh RETURN VALUES .Rv -std Modified: stable/11/sys/vm/swap_pager.c ============================================================================== --- stable/11/sys/vm/swap_pager.c Tue Nov 14 18:01:48 2017 (r325821) +++ stable/11/sys/vm/swap_pager.c Tue Nov 14 18:07:51 2017 (r325822) @@ -156,7 +156,7 @@ static vm_ooffset_t swap_reserved; SYSCTL_QUAD(_vm, OID_AUTO, swap_reserved, CTLFLAG_RD, &swap_reserved, 0, "Amount of swap storage needed to back all allocated anonymous memory."); static int overcommit = 0; -SYSCTL_INT(_vm, OID_AUTO, overcommit, CTLFLAG_RW, &overcommit, 0, +SYSCTL_INT(_vm, VM_OVERCOMMIT, overcommit, CTLFLAG_RW, &overcommit, 0, "Configure virtual memory overcommit behavior. See tuning(7) " "for details."); static unsigned long swzone; Modified: stable/11/sys/vm/vm_param.h ============================================================================== --- stable/11/sys/vm/vm_param.h Tue Nov 14 18:01:48 2017 (r325821) +++ stable/11/sys/vm/vm_param.h Tue Nov 14 18:07:51 2017 (r325822) @@ -84,7 +84,8 @@ #define VM_V_PAGEOUT_FREE_MIN 9 /* vm_cnt.v_pageout_free_min */ #define VM_OBSOLETE_10 10 /* pageout algorithm */ #define VM_SWAPPING_ENABLED 11 /* swapping enabled */ -#define VM_MAXID 12 /* number of valid vm ids */ +#define VM_OVERCOMMIT 12 /* vm.overcommit */ +#define VM_MAXID 13 /* number of valid vm ids */ /* * Structure for swap device statistics _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"