Re: [PATCH] IPC initialize shmmax and shmall from the current value not the default

From: Manfred Spraul
Date: Sun May 25 2014 - 16:01:40 EST


This is a multi-part message in MIME format. Hi Marian,

On 05/22/2014 03:01 PM, Marian Marinov wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/05/2014 10:59 PM, Marian Marinov wrote:

In my tests it worked exactly as expected. Here is an example:

[root@sp2 ~]# sysctl -a|grep shmmax kernel.shmmax = 68719476736 [root@sp2 ~]# lxc-attach -n cent_plain
[root@localhost ~]# sysctl -a|grep shmmax kernel.shmmax = 68719476736 [root@localhost ~]# halt [root@sp2 ~]# sysctl
-a|grep shmmax kernel.shmmax = 68719476736 [root@sp2 ~]# sysctl kernel.shmmax=34359738368 kernel.shmmax =
34359738368 [root@sp2 ~]# lxc-start -n cent_plain -d [root@sp2 ~]# lxc-attach -n cent_plain [root@localhost ~]#
sysctl -a|grep shmmax kernel.shmmax = 34359738368 [root@localhost ~]#

So it seams to work as expected :)

It works because wen you setup a new shmmax limit it is actually the limit in the init_ipc_ns. So when we are
creating a new ipc_ns its ok to copy the values from init_ipc_ns.

-Marian

Ping?

So will there be any more comments on that?


Attached is an untested idea:
- each new namespace copies from it's parent, i.e. nested namespaces should work.
- msg, sem and shm updated

--
Manfred