]> git.baikalelectronics.ru Git - kernel.git/commit
ipc/msg: increase MSGMNI, remove scaling
authorManfred Spraul <manfred@colorfullife.com>
Sat, 13 Dec 2014 00:58:17 +0000 (16:58 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Dec 2014 20:42:52 +0000 (12:42 -0800)
commit312021df97a494a508b9cb179896dcc8032d6dd6
tree9fa11fd54259ed433d89b0a483e172b8e75d8f23
parentf63d0a94534c3e526bb2f69dd7812e27824c448f
ipc/msg: increase MSGMNI, remove scaling

SysV can be abused to allocate locked kernel memory.  For most systems, a
small limit doesn't make sense, see the discussion with regards to SHMMAX.

Therefore: increase MSGMNI to the maximum supported.

And: If we ignore the risk of locking too much memory, then an automatic
scaling of MSGMNI doesn't make sense.  Therefore the logic can be removed.

The code preserves auto_msgmni to avoid breaking any user space applications
that expect that the value exists.

Notes:
1) If an administrator must limit the memory allocations, then he can set
MSGMNI as necessary.

Or he can disable sysv entirely (as e.g. done by Android).

2) MSGMAX and MSGMNB are intentionally not increased, as these values are used
to control latency vs. throughput:
If MSGMNB is large, then msgsnd() just returns and more messages can be queued
before a task switch to a task that calls msgrcv() is forced.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Rafael Aquini <aquini@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/sysctl/kernel.txt
include/linux/ipc_namespace.h
include/uapi/linux/msg.h
ipc/Makefile
ipc/ipc_sysctl.c
ipc/ipcns_notifier.c [deleted file]
ipc/msg.c
ipc/namespace.c
ipc/util.c