Date: Wed, 8 Feb 2012 09:18:22 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r231195 - head/sys/kern Message-ID: <201202080918.q189IM5i031864@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Wed Feb 8 09:18:22 2012 New Revision: 231195 URL: http://svn.freebsd.org/changeset/base/231195 Log: Allow to set kern.ipc.shmmax from /boot/loader.conf. MFC after: 1 week Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Wed Feb 8 08:52:40 2012 (r231194) +++ head/sys/kern/sysv_shm.c Wed Feb 8 09:18:22 2012 (r231195) @@ -891,14 +891,14 @@ shminit() printf("kern.ipc.shmmaxpgs is now called kern.ipc.shmall!\n"); #endif TUNABLE_ULONG_FETCH("kern.ipc.shmall", &shminfo.shmall); - - /* Initialize shmmax dealing with possible overflow. */ - for (i = PAGE_SIZE; i > 0; i--) { - shminfo.shmmax = shminfo.shmall * i; - if (shminfo.shmmax >= shminfo.shmall) - break; + if (!TUNABLE_ULONG_FETCH("kern.ipc.shmmax", &shminfo.shmmax)) { + /* Initialize shmmax dealing with possible overflow. */ + for (i = PAGE_SIZE; i > 0; i--) { + shminfo.shmmax = shminfo.shmall * i; + if (shminfo.shmmax >= shminfo.shmall) + break; + } } - TUNABLE_ULONG_FETCH("kern.ipc.shmmin", &shminfo.shmmin); TUNABLE_ULONG_FETCH("kern.ipc.shmmni", &shminfo.shmmni); TUNABLE_ULONG_FETCH("kern.ipc.shmseg", &shminfo.shmseg);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202080918.q189IM5i031864>