From: Nadia Derbey Date: Fri, 6 Jun 2008 05:46:36 +0000 (-0700) Subject: ipc: restore MSGPOOL original value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=68aa0a206a7a2dd8655a50b36e8274eb87b84544;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git ipc: restore MSGPOOL original value When posting: [PATCH 1/8] Scaling msgmni to the amount of lowmem (see http://article.gmane.org/gmane.linux.kernel/637849/) I changed the MSGPOOL value to make it fit what is said in the man pages (i.e. a size in bytes). But Michael Kerrisk rightly complained that this change could affect the ABI. So I'm posting this patch to make MSGPOOL expressed back in Kbytes. Michael, on his side, has fixed the man page. Signed-off-by: Nadia Derbey Cc: Pierre Peiffer Cc: Manfred Spraul Acked-by: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/msg.h b/include/linux/msg.h index 6f3b8e79a991..56abf1558fdd 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h @@ -64,11 +64,11 @@ struct msginfo { #define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ /* unused */ -#define MSGPOOL (MSGMNI * MSGMNB) /* size in bytes of message pool */ +#define MSGPOOL (MSGMNI * MSGMNB / 1024) /* size in kbytes of message pool */ #define MSGTQL MSGMNB /* number of system message headers */ #define MSGMAP MSGMNB /* number of entries in message map */ #define MSGSSZ 16 /* message segment size */ -#define __MSGSEG (MSGPOOL / MSGSSZ) /* max no. of segments */ +#define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ) /* max no. of segments */ #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) #ifdef __KERNEL__