From: Chris Mason <mason@suse.com>
Subject: increase defaults for shmmall, shmmax, msgmax and msgmnb
References: 146656
Patch-mainline: not yet

The defaults are too small for most users.

Acked-by: Jeff Mahoney <jeffm@suse.com>

---
 include/linux/msg.h |    4 ++--
 include/linux/sem.h |    2 +-
 include/linux/shm.h |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

--- a/include/linux/msg.h
+++ b/include/linux/msg.h
@@ -60,8 +60,8 @@ struct msginfo {
 #define MSG_MEM_SCALE 32
 
 #define MSGMNI    16   /* <= IPCMNI */     /* max # of msg queue identifiers */
-#define MSGMAX  8192   /* <= INT_MAX */   /* max size of message (bytes) */
-#define MSGMNB 16384   /* <= INT_MAX */   /* default max size of a message queue */
+#define MSGMAX  65536   /* <= INT_MAX */   /* max size of message (bytes) */
+#define MSGMNB 65536   /* <= INT_MAX */   /* default max size of a message queue */
 
 /* unused */
 #define MSGPOOL (MSGMNI * MSGMNB / 1024) /* size in kbytes of message pool */
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -63,7 +63,7 @@ struct  seminfo {
 	int semaem;
 };
 
-#define SEMMNI  128             /* <= IPCMNI  max # of semaphore identifiers */
+#define SEMMNI  1024            /* <= IPCMNI  max # of semaphore identifiers */
 #define SEMMSL  250             /* <= 8 000 max num of semaphores per id */
 #define SEMMNS  (SEMMNI*SEMMSL) /* <= INT_MAX max # of semaphores in system */
 #define SEMOPM  32	        /* <= 1 000 max num of ops per semop call */
--- a/include/linux/shm.h
+++ b/include/linux/shm.h
@@ -14,7 +14,7 @@
  * be increased by sysctl
  */
 
-#define SHMMAX 0x2000000		 /* max shared seg size (bytes) */
+#define SHMMAX ULONG_MAX		 /* max shared seg size (bytes) */
 #define SHMMIN 1			 /* min shared seg size (bytes) */
 #define SHMMNI 4096			 /* max num of segs system wide */
 #ifdef __KERNEL__
