浏览代码

ipc: HARD_MSGMAX should be higher not lower on 64bit

We have HARD_MSGMAX lower on 64bit than on 32bit, since usually 64bit
machines have more memory than 32bit machines.

Making it higher on 64bit seems reasonable, and keep the original number
on 32bit.

Acked-by: Serge E. Hallyn <serue@us.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Amerigo Wang 15 年之前
父节点
当前提交
9cf18e1dd7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/linux/ipc_namespace.h

+ 1 - 1
include/linux/ipc_namespace.h

@@ -87,7 +87,7 @@ extern int mq_init_ns(struct ipc_namespace *ns);
 /* default values */
 /* default values */
 #define DFLT_QUEUESMAX 256     /* max number of message queues */
 #define DFLT_QUEUESMAX 256     /* max number of message queues */
 #define DFLT_MSGMAX    10      /* max number of messages in each queue */
 #define DFLT_MSGMAX    10      /* max number of messages in each queue */
-#define HARD_MSGMAX    (131072/sizeof(void *))
+#define HARD_MSGMAX    (32768*sizeof(void *)/4)
 #define DFLT_MSGSIZEMAX 8192   /* max message size */
 #define DFLT_MSGSIZEMAX 8192   /* max message size */
 #else
 #else
 static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; }
 static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; }