Files
erofs-linux/include/linux
Pierre Peiffer ed2ddbf88c IPC: make struct ipc_ids static in ipc_namespace
Each ipc_namespace contains a table of 3 pointers to struct ipc_ids (3 for
msg, sem and shm, structure used to store all ipcs) These 'struct ipc_ids'
are dynamically allocated for each icp_namespace as the ipc_namespace
itself (for the init namespace, they are initialized with pointers to
static variables instead)

It is so for historical reason: in fact, before the use of idr to store the
ipcs, the ipcs were stored in tables of variable length, depending of the
maximum number of ipc allowed.  Now, these 'struct ipc_ids' have a fixed
size.  As they are allocated in any cases for each new ipc_namespace, there
is no gain of memory in having them allocated separately of the struct
ipc_namespace.

This patch proposes to make this table static in the struct ipc_namespace.
Thus, we can allocate all in once and get rid of all the code needed to
allocate and free these ipc_ids separately.

Signed-off-by: Pierre Peiffer <[email protected]>
Acked-by: Cedric Le Goater <[email protected]>
Cc: Pavel Emelyanov <[email protected]>
Cc: Nadia Derbey <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2008-02-08 09:22:26 -08:00
..
…
…
…
…
2008-02-06 10:41:15 -08:00
…
2008-02-07 08:42:23 -08:00
…
…
…
…
2008-02-05 09:44:13 -08:00
2008-02-05 03:20:13 -08:00
2008-02-07 08:42:30 -08:00
2008-02-06 10:41:02 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-02-03 17:45:46 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-02-03 17:45:46 +02:00
…
2008-02-03 15:42:53 +02:00
…
…
…
…
…
…
…
…
…
2008-02-08 02:09:56 +00:00
…
2008-02-08 09:22:24 -08:00
2008-02-07 20:39:40 -05:00
…
…
…
…
…
…
…
…
…
…
…
2008-02-07 08:42:30 -08:00
…
…
2008-02-03 17:45:46 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-02-03 15:42:53 +02:00
…
…
…
2008-02-05 09:44:19 -08:00
…
…
…
…
…
…
…
…
2008-02-07 20:39:44 -05:00
…
…
…
…
…
…
…
…
…
…
2008-02-06 02:57:51 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-02-06 22:39:45 +01:00
…
…
2008-02-06 10:41:02 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-02-06 10:41:21 -08:00
…
…
…
2008-02-07 08:42:30 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-02-03 17:45:46 +02:00
…
2008-02-06 10:41:01 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-02-05 09:44:16 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-02-06 16:29:59 +11:00
…
2008-02-05 09:44:19 -08:00
…
…
…
…
…
2008-02-02 11:32:01 -08:00
2008-02-02 02:44:34 +03:00
…
…
…
…
…
…
2008-02-03 17:45:46 +02:00
…
2008-02-06 10:41:20 -08:00
…
…
…
…
…
…
…
2008-02-06 10:41:07 -08:00
…
…
…
…
…
2008-02-05 09:44:22 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-02-07 08:42:18 -08:00
…
…
…
…
…
…
…
2008-02-07 08:42:34 -08:00
…
…
…
2008-02-07 08:42:30 -08:00
2008-02-06 10:41:02 -08:00
…
2008-02-03 17:45:46 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-02-07 08:42:34 -08:00
…
…
…
…
…
2008-02-05 09:44:16 -08:00
…
2008-02-05 09:44:07 -08:00
…
…
…
…
…
…
…
…
2008-02-01 23:20:26 -05:00
…
…
…
…
…
…
…
2008-02-06 10:41:02 -08:00
…
…
…
2008-02-07 08:42:16 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-02-04 23:50:13 +11:00
2008-02-04 23:50:03 +11:00
2008-02-04 23:50:02 +11:00
2008-02-04 23:50:03 +11:00
…
2008-02-06 10:41:03 -08:00
…
2008-02-05 09:44:07 -08:00
2008-02-03 15:42:53 +02:00
…
…
…
…
…
…
…