Re: [PATCH -mm v2 3/3] sysv ipc: use auto_msgmnb to desactivate andreactivate msgmnb recomputation

From: Randy Dunlap
Date: Thu Jul 17 2008 - 17:14:29 EST


On Tue, 15 Jul 2008 23:14:10 +0200 Solofo.Ramangalahy@xxxxxxxx wrote:

> From: Solofo Ramangalahy <Solofo.Ramangalahy@xxxxxxxx>
>
> Add /proc/sys/kernel/auto_msgmnb to control automatic recomputation of
> /proc/sys/kernel/msgmnb (msg_ctlmnb).
>
> Signed-off-by: Solofo Ramangalahy <Solofo.Ramangalahy@xxxxxxxx>
> ---
> Documentation/sysctl/kernel.txt | 35 ++++++++++++++++
> include/linux/ipc_namespace.h | 5 ++
> ipc/ipc_sysctl.c | 87 ++++++++++++++++++++++++++++++++++++----
> ipc/ipcns_notifier.c | 62 +++++++++++++++++++++++++++-
> ipc/namespace.c | 2
> ipc/util.c | 1
> 6 files changed, 183 insertions(+), 9 deletions(-)
>
> Index: linux-2.6.26-rc8-mm1-MSGMNB3/Documentation/sysctl/kernel.txt
> ===================================================================
> --- linux-2.6.26-rc8-mm1-MSGMNB3.orig/Documentation/sysctl/kernel.txt
> +++ linux-2.6.26-rc8-mm1-MSGMNB3/Documentation/sysctl/kernel.txt
> @@ -179,6 +179,41 @@ kernel stack.
>
> ==============================================================
>
> +msgmnb
> +
> +Maximum size in bytes, not in message count, of a single SystemV IPC
> +message queue (b stands for bytes).
> +
> +This value is dynamic and depends on the online cpu count of the
> +machine (taking cpu hotplug into account).

Prefer "CPU" to "cpu".

> +
> +Computed values are between MSGMNB and MSGMNB*MSG_CPU_SCALE #define
> +constants (currently [16384,65536]).
> +
> +The exact value is automatically (re)computed, but:
> +
> +. If the value is positioned from user space (via procfs or sysctl()),

s/positioned/specified/ or set

> + then the automatic recomputation is disabled. E.g.:
> +
> + # echo 16384 > /proc/sys/kernel/msgmnb
> +
> +. The automatic recomputation can also be disabled via auto_msgmnb,
> + e.g.:
> +
> + # echo 0 > /proc/sys/kernel/auto_msgmnb
> +
> +. When disabled, the automatic recomputation can be reenabled via
> + auto_msgmnb, e.g.:
> +
> + # echo 1 > /proc/sys/kernel/auto_msgmnb
> +
> +The msgmnb and auto_msgmnb values in each (ipc) namespace are
> +independent.
> +

Prefer IPC instead of ipc (above and below).

> +Initially, the msgmnb value is computed automatically: at boot time
> +and (ipc) namespace creation.
> +
> +==============================================================


---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/