]> xenbits.xensource.com Git - libvirt.git/commitdiff
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)
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

index c126ec7e41a6295a6ef11744e9be9291d3c971da..8f33a85a5639f351c5550ca523462ab9fa4b5706 100644 (file)
@@ -2158,9 +2158,6 @@ virResctrlAllocAssign(virResctrlInfo *resctrl,
     if (virResctrlAllocCopyMasks(alloc, alloc_default) < 0)
         return -1;
 
-    if (virResctrlAllocCopyMemBW(alloc, alloc_default) < 0)
-        return -1;
-
     for (level = 0; level < alloc->nlevels; level++) {
         virResctrlAllocPerLevel *a_level = alloc->levels[level];
         virResctrlAllocPerLevel *f_level = NULL;