diff options
author | ru <ru@FreeBSD.org> | 2009-10-24 19:00:58 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2009-10-24 19:00:58 +0000 |
commit | 0a59296a7ea647c35f672bcd53579e444b7d79c0 (patch) | |
tree | fd47a31a231861cba15ad071837913b52ee323a8 | |
parent | e866365bb9dfd64fa7764759cbc1616b429a6739 (diff) | |
download | FreeBSD-src-0a59296a7ea647c35f672bcd53579e444b7d79c0.zip FreeBSD-src-0a59296a7ea647c35f672bcd53579e444b7d79c0.tar.gz |
- Rename tunable kern.ipc.shmmaxpgs to kern.ipc.shmall.
- Explain the fuss when initializing shmmax.
PR: 75542 (mistakenly closed instead of PR 75541)
-rw-r--r-- | sys/kern/sysv_shm.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 4e62211..a16c8af 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -821,12 +821,19 @@ shminit() { int i; - TUNABLE_ULONG_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall); +#ifndef BURN_BRIDGES + if (TUNABLE_ULONG_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall) != 0) + 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; } + TUNABLE_ULONG_FETCH("kern.ipc.shmmin", &shminfo.shmmin); TUNABLE_ULONG_FETCH("kern.ipc.shmmni", &shminfo.shmmni); TUNABLE_ULONG_FETCH("kern.ipc.shmseg", &shminfo.shmseg); |