]> git.ipfire.org Git - thirdparty/libvirt.git/commit
resctrl: Don't assume MBA availability in virResctrlAllocNewFromInfo
authorMartin Kletzander <mkletzan@redhat.com>
Wed, 11 Sep 2024 13:06:04 +0000 (15:06 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 13 Sep 2024 10:55:39 +0000 (12:55 +0200)
commitf3fd0664cf96590b4b82c03610d05b2db462991b
tree31d6b38d78df69ce6a13df4bec7780b3211e002f
parentbc97a2c043b36172a0c1fcc35a4a8e3f7f7a5248
resctrl: Don't assume MBA availability in virResctrlAllocNewFromInfo

Weirdly, the existence of /sys/fs/resctrl/info/MB does not always mean
that MBA is available and used on the system.  Instead of assuming that
copy the values from the default (root) allocation.  This also makes it
nicer to use the proper values in case the system does not use
percentages or when the root allocation already limits the bandwidth.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virresctrl.c
tests/virresctrldata/resctrl.schemata