[PATCH 01/10] resctrl: Account for memory bandwidth of 0 being valid

Martin Kletzander posted 10 patches 1 year, 4 months ago
Only 9 patches received!
[PATCH 01/10] resctrl: Account for memory bandwidth of 0 being valid
Posted by Martin Kletzander 1 year, 4 months ago
In some scenarios the memory bandwidth in the schemata file might be 0
and so can the minimum allocation in other ones.  Remove checks which
were added for extra cautiousness.

Resolves: https://issues.redhat.com/browse/RHEL-54235
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
---
 src/util/virresctrl.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c
index 30ae25c48726..8ed111c182e7 100644
--- a/src/util/virresctrl.c
+++ b/src/util/virresctrl.c
@@ -1425,8 +1425,7 @@ virResctrlAllocParseProcessMemoryBandwidth(virResctrlInfo *resctrl,
                        _("Invalid bandwidth %1$u"), bandwidth);
         return -1;
     }
-    if (bandwidth < resctrl->membw_info->min_bandwidth ||
-        id > resctrl->membw_info->max_id) {
+    if (id > resctrl->membw_info->max_id) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("Missing or inconsistent resctrl info for memory bandwidth node '%1$u'"),
                        id);
@@ -1463,7 +1462,6 @@ virResctrlAllocParseMemoryBandwidthLine(virResctrlInfo *resctrl,
         return 0;
 
     if (!resctrl || !resctrl->membw_info ||
-        !resctrl->membw_info->min_bandwidth ||
         !resctrl->membw_info->bandwidth_granularity) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                        _("Missing or inconsistent resctrl info for memory bandwidth allocation"));
-- 
2.46.0
Re: [PATCH 01/10] resctrl: Account for memory bandwidth of 0 being valid
Posted by Michal Prívozník 1 year, 4 months ago
On 9/12/24 16:47, Martin Kletzander wrote:
> In some scenarios the memory bandwidth in the schemata file might be 0
> and so can the minimum allocation in other ones.  Remove checks which

s/  / /

> were added for extra cautiousness.
> 
> Resolves: https://issues.redhat.com/browse/RHEL-54235
> Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
> ---
>  src/util/virresctrl.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 

Michal