[CRIU] [PATCH v2 resent 1/4] ipc/sysctl: c/r fs.mqueue.msg_default fs.mqueue.msgsize_default

Pavel Emelyanov xemul at virtuozzo.com
Thu Jul 14 03:52:16 PDT 2016


On 07/13/2016 05:12 PM, Pavel Tikhomirov wrote:
> 
> 
> On 07/13/2016 03:58 PM, Pavel Tikhomirov wrote:
>>
>>
>> On 07/13/2016 03:52 PM, Pavel Emelyanov wrote:
>>> On 07/04/2016 10:47 AM, Pavel Tikhomirov wrote:
>>>> we already have 3/5 fs.mqueue.xxx sysctls so why not have all:
>>>>
>>>> /proc/sys/fs/mqueue/msg_default is  a read/write  file for
>>>> setting/getting the default number of messages in a queue value
>>>> if attr parameter of mq_open(2) is NULL. If it exceed msg_max,
>>>> the default value is initialized msg_max.
>>>>
>>>> /proc/sys/fs/mqueue/msgsize_default is a read/write file for
>>>> setting/getting the default message size value if attr parameter
>>>> of mq_open(2) is NULL. If it exceed msgsize_max, the default
>>>> value is initialized msgsize_max.
>>>>
>>>> *We have these sysctls writable in VZ7 CT.
>>>
>>> What about upstream kernel? Are these writable for it as well? If yes,
>>> how
>>> has it happened that vzkernel DIDN'T have them as such at some point?
>>
> 
> Sorry, I though it was about net sysctls but that is about ipc...
> 
> So, for ipc sysctls:
> 
> Sysctls are writable in sub-ipcns:
> # unshare -ri
> # cat /proc/sys/fs/mqueue/msgsize_default
> 8192
> # echo 16384 > /proc/sys/fs/mqueue/msgsize_default
> # cat /proc/sys/fs/mqueue/msgsize_default
> 16384
> 
> Sysctls msg(size)_default become writable in vzkernel in commit:

No no no, my question was different. They are read-write in vanilla kernel, but
have been read-only for some time in vzkenrel. So when and why have they become 
read-only in vzkernel?

> commit 42faae2077ff33775d612b0d4f17aedc000e0a37
> Author: Andrew Vagin <avagin at openvz.org>
> Date:   Thu Dec 19 13:28:27 2013 +0400
> 
>      ve/sysctl: allow to change mqueue sysctl-s
> 
>      All mqueue data are accounted into the kmem ubc.
>      These sysctl belong to ipcns, so all changes doesn't affect other 
> containers.
> 
>      https://jira.sw.ru/browse/PSBM-20102
> 
>      Signed-off-by: Andrew Vagin <avagin at openvz.org>
>      Acked-by: Cyrill Gorcunov <gorcunov at openvz.org>
> 



More information about the CRIU mailing list