Skip to content

ipc: Increase IPCMNI limit

Waiman Long linux-doc linux-fsdevel lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v12 Latest3 patches 8 repliesIn review
  2. v113 patches 5 repliesSuperseded
  3. v104 patches 4 repliesSuperseded

Changes in v12 from the cover letter

- As suggested by Matthew, change patch 2 to increment sequence number when there is a wrap around in generated ID instead of after a ID deletion.

Patches in v12 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ipc: Allow boot time extension of IPCMNI from 32k to 16MDocumentation/admin-guide/kernel-parameters.txt ipc/ipc_sysctl.c ipc/util.c +1 more+54 -150 replies
2/3ipc: Conserve sequence numbers in ipcmni_extend modeinclude/linux/ipc_namespace.h ipc/util.c+10 -33 replies
3/3ipc: Do cyclic id allocation with ipcmni_extend modeDocumentation/admin-guide/kernel-parameters.txt ipc/ipc_sysctl.c ipc/util.c +1 more+14 -25 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchManfred SpraulWaiman Long
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v12 thread

Cover letter [PATCH v12 0/3] ipc: Increase IPCMNI limit

v11->v12:
- As suggested by Matthew, change patch 2 to increment sequence number when there is a wrap around in generated ID instead of after a ID deletion.

v10->v11:
- Remove the sysctl parameter. Now delete mode is the only way the sequence number is updated. The only choice users had to make is whether they need to specify ipcmni_extend in the boot command line or not.
- Cyclical id allocation is enabled only in the ipcmni_extend mode.
- Increase max # of ids in ipcmni_extend mode to 16M.

v9 patch: https://lkml.org/lkml/2018/9/7/1141
v10 patch: https://lkml.org/lkml/2018/11/5/791
v11 patch: https://lkml.org/lkml/2018/11/10/32

There are users out there requesting increase in the IPCMNI value to more than 32k. This patchset does that by using a boot kernel parameter "ipcmni_extend" to increase the IPCMNI limit from 32k to 16M when that boot command line option is specified.

Patch 1 adds a "ipcmni_extend" boot command line parameter to extend the IPCMNI limit from 32k to 16M.

Patch 2 changes how the sequence number within an id is being generated by incrementing it only when the generated id is not greater than the previous one. That reduces the chance of id reuse whether "ipcmni_extend" is set or not.

Patch 3 makes identifier allocation go cyclical through the entire 24-bit id space with "ipcmni_extend" only to further reduce the chance of id reuse, but probably with a slight memory and performance overhead.

The cyclical id allocation isn't done for non-ipcmni_extend mode as the potential memory and performance overhead may be problematic on system with slow CPU and little memory. Systems that run applications which need more than 32k IPC identifiers can certainly afford the extra overhead.

Waiman Long (3):
ipc: Allow boot time extension of IPCMNI from 32k to 16M
ipc: Conserve sequence numbers in ipcmni_extend mode
ipc: Do cyclic id allocation with ipcmni_extend mode

 Documentation/admin-guide/kernel-parameters.txt |  6 ++++
 include/linux/ipc_namespace.h                   |  1 +
 ipc/ipc_sysctl.c                                | 14 +++++++-
 ipc/util.c                                      | 27 ++++++++++-----
 ipc/util.h                                      | 46 ++++++++++++++++++++-----
 5 files changed, 76 insertions(+), 18 deletions(-)
Signature · 1 line
1.8.3.1