Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > ea32411352494358b8d75a78402a4713 > files > 2043

kernel-2.6.18-238.19.1.el5.centos.plus.src.rpm

From: Amerigo Wang <amwang@redhat.com>
Date: Thu, 17 Dec 2009 07:22:35 -0500
Subject: [misc] ipc: HARD_MSGMAX should be higher on 64bit
Message-id: <20091217072539.4297.97184.sendpatchset@localhost.localdomain>
Patchwork-id: 22019
O-Subject: [PATCH RHEL5] ipc: HARD_MSGMAX should be higher not lower on 64bit
Bugzilla: 548334
RH-Acked-by: Jarod Wilson <jarod@redhat.com>

BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=548334

Description:
It looks weird that 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.

Upstream status:
Commit 9cf18e1dd74c.

Signed-off-by: WANG Cong <amwang@redhat.com>


diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 5b2e475..909f9c9 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -53,7 +53,7 @@
 /* default values */
 #define DFLT_QUEUESMAX	256	/* max number of message queues */
 #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 */