tools/xenstore: set open file descriptor limit for xenstored
authorJuergen Gross <jgross@suse.com>
Tue, 12 Oct 2021 13:41:48 +0000 (15:41 +0200)
committerIan Jackson <iwj@xenproject.org>
Mon, 18 Oct 2021 13:17:28 +0000 (14:17 +0100)
commit9cfeb83cbe23a873de512211d7ecd989348b9df0
tree9ebcde9c6f2ece0cc2e768e429b985c7432d238c
parentf282182af32939107d47943aba242d3189ec6f90
tools/xenstore: set open file descriptor limit for xenstored

Add a configuration item for the maximum number of open file
descriptors xenstored should be allowed to have.

The default should be "unlimited" in order not to restrict xenstored
in the number of domains it can support, but unfortunately the kernel
is normally limiting the maximum value via /proc/sys/fs/nr_open [1],
[2]. So check that file to exist and if it does, limit the maximum
value to the one specified by /proc/sys/fs/nr_open.

As an aid for the admin configuring the value add a comment specifying
the common needs of xenstored for the different domain types.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=60fd760fb9ff7034360bab7137c917c0330628c2
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0c2d64fb6cae9aae480f6a46cfe79f8d7d48b59f

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
tools/hotplug/Linux/init.d/sysconfig.xencommons.in
tools/hotplug/Linux/launch-xenstore.in