]> git.proxmox.com Git - pve-common.git/commit - src/PVE/ProcFSTools.pm
ProcFSTools: fix read_meminfo without KSM
authorStoiko Ivanov <s.ivanov@proxmox.com>
Tue, 5 May 2020 15:01:07 +0000 (17:01 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 5 May 2020 16:25:57 +0000 (18:25 +0200)
commit9c1ccaf9229f038339fe42070bf6a954ab834ea4
tree7e094760d0781b5065337f89ffff83013adc3e4e
parent890d25d96385ea2e0059e8e2f2067281f764f19f
ProcFSTools: fix read_meminfo without KSM

on kernel configs where KSM is not enabled (e.g. an openstack instance at
OVH) the file /sys/kernel/mm/ksm/pages_sharing does not exist.
In that case there is no memory shared so assuming 0 is reasonable.

While this is not the case with our shipped kernel, and thus will probably
not happen on a PVE installation, PMG can run quite happily with a different
kernel (the reporter had this on an openstack instance at OVH).

a quick grep through our codebase showed only the API2::Nodes::Nodeinfo::status
call as user of the memshared property.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PVE/ProcFSTools.pm