diff options
author | Manfred Spraul <manfred@colorfullife.com> | 2014-12-12 19:58:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-13 15:42:52 -0500 |
commit | 0050ee059f7fc86b1df2527aaa14ed5dc72f9973 (patch) | |
tree | 9fa11fd54259ed433d89b0a483e172b8e75d8f23 /Documentation/sysctl | |
parent | e843e7d2c88b7db107a86bd2c7145dc715c058f4 (diff) |
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>
Diffstat (limited to 'Documentation/sysctl')
-rw-r--r-- | Documentation/sysctl/kernel.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index b5d0c8501a18..75511efefc64 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -116,10 +116,12 @@ set during run time. | |||
116 | 116 | ||
117 | auto_msgmni: | 117 | auto_msgmni: |
118 | 118 | ||
119 | Enables/Disables automatic recomputing of msgmni upon memory add/remove | 119 | This variable has no effect and may be removed in future kernel |
120 | or upon ipc namespace creation/removal (see the msgmni description | 120 | releases. Reading it always returns 0. |
121 | above). Echoing "1" into this file enables msgmni automatic recomputing. | 121 | Up to Linux 3.17, it enabled/disabled automatic recomputing of msgmni |
122 | Echoing "0" turns it off. auto_msgmni default value is 1. | 122 | upon memory add/remove or upon ipc namespace creation/removal. |
123 | Echoing "1" into this file enabled msgmni automatic recomputing. | ||
124 | Echoing "0" turned it off. auto_msgmni default value was 1. | ||
123 | 125 | ||
124 | 126 | ||
125 | ============================================================== | 127 | ============================================================== |