From nobody Sun Dec 22 06:06:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1726475675056858.9399970867847; Mon, 16 Sep 2024 01:34:35 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id F23171963; Mon, 16 Sep 2024 04:34:33 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 143081548; Mon, 16 Sep 2024 04:34:19 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id DF4C5D80; Mon, 16 Sep 2024 04:34:15 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id F27DE1506 for ; Mon, 16 Sep 2024 04:34:14 -0400 (EDT) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-497-ABdd9uLjOY6-MICsWzTI5Q-1; Mon, 16 Sep 2024 04:34:13 -0400 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-42cb998fd32so29131825e9.1 for ; Mon, 16 Sep 2024 01:34:13 -0700 (PDT) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42da22d86e8sm70303435e9.16.2024.09.16.01.34.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2024 01:34:10 -0700 (PDT) Received: from wheatley.brq.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 80F7624AB73F for ; Mon, 16 Sep 2024 10:34:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726475654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NHYnK/ILjsjXrDgx3VDeemcUZjEFWLBdflSAuv3eYoQ=; b=IQRt/OivGbSj+eweuqclrZNX6rPfaeFo7+fe6CUwWwr4sxHAET59OeKiqDi9Xfv8OsAbd4 Z7DEuj0xgjI5SqVZJumzyW73XT1LzOvQo28vboKASbmScdTs9UrZxVyaXliwWh/ONvPQyZ Nr9BSCGXnWnbWYP8CRMy5MId4WZAVQg= X-MC-Unique: ABdd9uLjOY6-MICsWzTI5Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726475652; x=1727080452; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NHYnK/ILjsjXrDgx3VDeemcUZjEFWLBdflSAuv3eYoQ=; b=Tw0HXWmnayIa5hxpr916spSCiLlAh/gqBxdvb4J9XIEhePEeqaSYZDqIT3ZVs/PQXs LFsdfXop1B7PBg66pTQgj0OEBF2d5gHa8fkRmDi/cQY7AGtXTk6jds+0WZ0MrIz/FpFe 6WHoVV42oJIhykSwUq58LVVhHdKo0FGtMKoPKY+TUIfh4mbb8wsuuYC0L+oQjk9THGsD 0aZCSHZgEk83F6LY+bnUt0lJUX2vi+IuMLfVPC3XAPOx6CG+PxLkMsLjGrSAvyTk7fyT JCLrBXxBgtY1x0yDE1/rhpvsGaZVXpWpDjshPco44bZASz74fCI5nfLvfSyE7A5i1dZD b4Xw== X-Gm-Message-State: AOJu0YyJQawb+SHiZ4LuUqzXOEfWSGO2W85W23G1OV7QPvDfUeak3g7M y3nMFqTWuKChRqhVRFb/gdvH7PCt4QHoTQmCofU9cH2Qc6dhOnJC69fNy8r+RQ8uTe+nAb1FIEB 5J7eWGC2L9tyneSmySZWIHXHmWYezKWNNopBeOl+c+cTFxeVg8v7CuaCN5N7zxzKc3y4Tu5bRmc gzsa9v/r8Ti7QxqEUQT9eeHvKlxThe0E/P3yjyYT8= X-Received: by 2002:a05:600c:3b13:b0:42c:b961:c902 with SMTP id 5b1f17b1804b1-42cdb522ce4mr92425755e9.12.1726475652261; Mon, 16 Sep 2024 01:34:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGoqy8i4nfPKQWbF7O1pcfm/wjttw6+g8nb1ZC7pl3PNskt49KIRRwOfRhlAEiWccfY0wdeMw== X-Received: by 2002:a05:600c:3b13:b0:42c:b961:c902 with SMTP id 5b1f17b1804b1-42cdb522ce4mr92425345e9.12.1726475651304; Mon, 16 Sep 2024 01:34:11 -0700 (PDT) From: Martin Kletzander To: devel@lists.libvirt.org Subject: [PATCH] resctrl: Do not rewrite default MB values for new allocations Date: Mon, 16 Sep 2024 10:33:34 +0200 Message-ID: <4692e74c55ffdce5df801f1e774611b2ef5b22c9.1726475614.git.mkletzan@redhat.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: JWEUELGULLAASVKQILKIH4URRIZTA6RN X-Message-ID-Hash: JWEUELGULLAASVKQILKIH4URRIZTA6RN X-MailFrom: mkletzan@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1726475676140116600 Content-Type: text/plain; charset="utf-8"; x-default="true" 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 Reviewed-by: Michal Privoznik --- src/util/virresctrl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index c126ec7e41a6..8f33a85a5639 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -2158,9 +2158,6 @@ virResctrlAllocAssign(virResctrlInfo *resctrl, if (virResctrlAllocCopyMasks(alloc, alloc_default) < 0) return -1; =20 - if (virResctrlAllocCopyMemBW(alloc, alloc_default) < 0) - return -1; - for (level =3D 0; level < alloc->nlevels; level++) { virResctrlAllocPerLevel *a_level =3D alloc->levels[level]; virResctrlAllocPerLevel *f_level =3D NULL; --=20 2.46.0