Skip to content

IPC: code rewrite + new functionalities

[email protected] containers lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 55 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15IPC/semaphores: code factorisationipc/sem.c+31 -300 replies
2/15IPC/shared memory: introduce shmctl_downipc/shm.c+72 -880 replies
3/15IPC/message queues: introduce msgctl_downipc/msg.c+89 -730 replies
4/15IPC/semaphores: move the rwmutex handling inside semctl_downipc/sem.c+13 -110 replies
5/15IPC/semaphores: remove one unused parameter from semctl_down()ipc/sem.c+3 -36 replies
6/15IPC: get rid of the use *_setbuf structure.ipc/msg.c ipc/sem.c ipc/shm.c+46 -860 replies
7/15IPC: introduce ipc_update_perm()ipc/msg.c ipc/sem.c ipc/shm.c +2 more+17 -120 replies
8/15IPC: consolidate all xxxctl_down() functionsipc/msg.c ipc/sem.c ipc/shm.c +2 more+66 -1190 replies
9/15(RFC) IPC: new kernel API to change an IDinclude/linux/msg.h include/linux/sem.h include/linux/shm.h +5 more+197 -029 replies
10/15(RFC) IPC: new IPC_SETID command to modify an IDinclude/linux/ipc.h ipc/compat.c ipc/msg.c +3 more+89 -70 replies
11/15(RFC) IPC: new IPC_SETALL command to modify all settingsinclude/linux/ipc.h ipc/compat.c ipc/msg.c +4 more+47 -50 replies
12/15(RFC) IPC/semaphores: make use of RCU to free the sem_undo_listinclude/linux/sem.h ipc/sem.c+31 -184 replies
13/15(RFC) IPC/semaphores: per <pid> semundo file in procfsfs/proc/base.c fs/proc/internal.h ipc/sem.c+157 -00 replies
14/15(RFC) IPC/semaphores: prepare semundo code to work on another task than currentipc/sem.c+68 -228 replies
15/15(RFC) IPC/semaphores: add write() operation to semundo file in procfsfs/proc/base.c ipc/sem.c+227 -70 replies

Reviews trailers per patch

12 of 15 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSerge Hallyn
SeriesA-b A-b A-b A-b A-b
1/15A-b
2/15A-b
3/15A-b
4/15A-b
5/15A-b
6/15A-b
7/15A-b
8/15A-b
9/15A-b
10/15A-b
11/15A-b
12/15
13/15A-b
14/15
15/15

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

Read the v1 thread

Cover letter [PATCH 2.6.24-rc8-mm1 00/15] IPC: code rewrite + new functionalities

Hi,

Here is a patchset about the IPC, which proposes to consolidate some
part of the existing code and to add some functionalities.

* Patches 1 to 8 don't change the existing behavior, but propose to rewrite some parts of the existing code. In fact, the three kinds of IPC (semaphores, message queues and shared memory) have some common commands (IPC_SET, IPC_RMID, etc...) but they are mainly handled in three different ways. These patches propose to consolidate this, by handling these commands the same way and try to use, as much as possible, some common code. This should increase readability and maintainability of the code, making them probably good candidate for the -mm tree, I think.

* Patches 9 to 15 propose to add some functionalities, and thus are submitted here for RFC, about both the interest and their implementation. These functionalities are:
- Two new control-commands:
. IPC_SETID: to change an IPC's id.
. IPC_SETALL: behaves as IPC_SET, except that it also sets all time
and pid values)
- add a /proc/<pid>/semundo file to read and write the undo values of
some semaphores for a given process.

As the namespaces and the "containers" are being integrated in the
kernel, these functionalities may be a first step to implement the checkpoint/restart of an application: in fact the existing API does not allow to specify or to change an ID when creating an IPC, when restarting an application, and the times/pids values of each IPCs are also altered. May be someone may find another interest about this ?

So again, comments are welcome.

Thanks.

Signature · 1 line
Pierre