]> www.infradead.org Git - users/willy/linux.git/commit
ipc: allow boot time extension of IPCMNI from 32k to 8M
authorWaiman Long <longman@redhat.com>
Wed, 5 Dec 2018 00:14:14 +0000 (11:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 6 Dec 2018 22:09:11 +0000 (09:09 +1100)
commit4ae30e9ba2d3d2d777651ec777a3be11227dd00f
treea57fddd9eb5287b59d00b868df091f6143db8102
parent63b63c4b6cc428ea59bb897762f8428190dd2e99
ipc: allow boot time extension of IPCMNI from 32k to 8M

The maximum number of unique System V IPC identifiers was limited to 32k.
That limit should be big enough for most use cases.

However, there are some users out there requesting for more, especially
those that are migrating from Solaris which uses 24 bits for unique
identifiers.  To satisfy the need of those users, a new boot time kernel
option "ipcmni_extend" is added to extend the IPCMNI value to 8M.  This is
a 256X increase which hopefully is big enough for them.

The use of this new option will change the pattern of the IPC identifiers
returned by functions like shmget(2).  An application that depends on such
pattern may not work properly.  So it should only be used if the users
really need more than 32k of unique IPC numbers.

This new option does have the side effect of reducing the maximum number
of unique sequence numbers from 64k down to 256.  So it is a trade-off.

The computation of a new IPC id is not done in the performance critical
path.  So a little bit of additional overhead shouldn't have any real
performance impact.

Link: http://lkml.kernel.org/r/1536352137-12003-4-git-send-email-longman@redhat.com
Signed-off-by: Waiman Long <longman@redhat.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis R. Rodriguez <mcgrof@kernel.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Documentation/admin-guide/kernel-parameters.txt
ipc/ipc_sysctl.c
ipc/util.c
ipc/util.h