]> git.ipfire.org Git - thirdparty/libvirt.git/commit
resctrl: Do not rewrite default MB values for new allocations
authorMartin Kletzander <mkletzan@redhat.com>
Mon, 16 Sep 2024 08:28:03 +0000 (10:28 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 16 Sep 2024 10:07:15 +0000 (12:07 +0200)
commit4b68c7e55beb7a5151481293472769c798d3ada8
tree6f595095d83cfea426870efbf2cbc0a4b16127c9
parentebc4580a5f04d16fb0ca373e80669b1102f29add
resctrl: Do not rewrite default MB values for new allocations

The code did it "just in case" the allocation was not reset for new
subdirectories.  That might've happened in the past with CAT settings,
but checking it now it is properly reset to its maximum values for each
new CLOSID (Class of Service ID).

The advantage of this is that we do not rewrite the value with itself
which causes an issue with the current linux kernel and mba_MBps option
where the default is UINT_MAX (or (uint32_t) -1), but gets rounded up to
bandwidth granularity (10), overflows and small number (4) is set
instead.

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