svn commit: r198449 - head/sys/kern

Ruslan Ermilov ru at FreeBSD.org
Sat Oct 24 19:00:58 UTC 2009


Author: ru
Date: Sat Oct 24 19:00:58 2009
New Revision: 198449
URL: http://svn.freebsd.org/changeset/base/198449

Log:
  - Rename tunable kern.ipc.shmmaxpgs to kern.ipc.shmall.
  - Explain the fuss when initializing shmmax.
  
  PR:	75542 (mistakenly closed instead of PR 75541)

Modified:
  head/sys/kern/sysv_shm.c

Modified: head/sys/kern/sysv_shm.c
==============================================================================
--- head/sys/kern/sysv_shm.c	Sat Oct 24 18:49:17 2009	(r198448)
+++ head/sys/kern/sysv_shm.c	Sat Oct 24 19:00:58 2009	(r198449)
@@ -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);


More information about the svn-src-head mailing list