From nobody Sun May 19 07:31:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673948264; cv=none; d=zohomail.com; s=zohoarc; b=meAIVroglgOXiKK92i2qwHJzUBndfvutC6bZsUYvnYaRdsUH32s4v2ja1efqi/nCQMXjhtBwDhFNKYT9sBn8m+AD+i3y0cUvYCw2uS13IgoEyKS07K/otENXEyaTkadkMCXHkdWZz5finfRFPztSUXjf0ijYLKlABbqHyt9dMIY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673948264; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zXX0gr8bcePaQeOD+rrFmUSaCU/Tm2L9+4uSQRRcTU0=; b=WeNHlA7gK9uZ1hFHm55XqeJxOAHrtgQBSmMqZREOdQN0LuLYZC2KE/b7AU4ZCDjz2/pUVn1dr0HplgCTWIikGhtiFmyTobWaP4gN0oczlonH5Qo952iAKLcw1fzHoHOIhTigg4G6Uu6SOCHiYBNbO7yESPNUp7WOlNauZV9whv4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1673948264729982.5364964571988; Tue, 17 Jan 2023 01:37:44 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-149-OLYPUvYVOwaqiEr7bCUXfw-1; Tue, 17 Jan 2023 04:37:40 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 558E83814597; Tue, 17 Jan 2023 09:37:38 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E0852166B26; Tue, 17 Jan 2023 09:37:38 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0FB5519465A4; Tue, 17 Jan 2023 09:37:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BBE0419465A3 for ; Tue, 17 Jan 2023 09:37:36 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id AF8A5175A2; Tue, 17 Jan 2023 09:37:36 +0000 (UTC) Received: from localhost.localdomain (ovpn-193-112.brq.redhat.com [10.40.193.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C9167AE5 for ; Tue, 17 Jan 2023 09:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673948263; h=from:from:sender:sender: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=zXX0gr8bcePaQeOD+rrFmUSaCU/Tm2L9+4uSQRRcTU0=; b=XfbPyiuXBd7xwvOt+BRycp/W9zKzZPOi2oeKSY0veAELnRmoo0T9gIDJy8ir5n8CYWzsrJ Dv0tC2XjLB1LiJlV/IDlLwyl1NxvIlL54oMfV12AE8N7q3ymRP6v6AtjiXJDL+UnjLaQ0O xxF863sOgKqgAw242Ycm1JUW13tw22k= X-MC-Unique: OLYPUvYVOwaqiEr7bCUXfw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 1/3] vircgroupv2: fix cpu.weight limits check Date: Tue, 17 Jan 2023 10:37:25 +0100 Message-Id: <2ebb0b5fb9289b42dcaf34e585e1a3ac061b62ba.1673948141.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673948266974100004 Content-Type: text/plain; charset="utf-8"; x-default="true" The cgroup v2 cpu.weight limits are different than cgroup v1 cpu.shares limits. Signed-off-by: Pavel Hrdina Reviewed-by: Erik Skultety Reviewed-by: Martin Kletzander --- src/util/vircgroup.h | 2 ++ src/util/vircgroupv2.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h index 690f09465c..adf3850b22 100644 --- a/src/util/vircgroup.h +++ b/src/util/vircgroup.h @@ -235,6 +235,8 @@ int virCgroupGetCpuShares(virCgroup *group, unsigned lo= ng long *shares); /* Based on kernel code ((1ULL << MAX_BW_BITS) - 1) where MAX_BW_BITS is * (64 - BW_SHIFT) and BW_SHIFT is 20 */ #define VIR_CGROUP_CPU_QUOTA_MAX 17592186044415LL +#define VIR_CGROUPV2_WEIGHT_MIN 1LL +#define VIR_CGROUPV2_WEIGHT_MAX 10000LL =20 int virCgroupSetCpuCfsPeriod(virCgroup *group, unsigned long long cfs_peri= od); int virCgroupGetCpuCfsPeriod(virCgroup *group, unsigned long long *cfs_per= iod); diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c index b1f562aa52..219b9c7f21 100644 --- a/src/util/vircgroupv2.c +++ b/src/util/vircgroupv2.c @@ -1499,13 +1499,13 @@ static int virCgroupV2SetCpuShares(virCgroup *group, unsigned long long shares) { - if (shares < VIR_CGROUP_CPU_SHARES_MIN || - shares > VIR_CGROUP_CPU_SHARES_MAX) { + if (shares < VIR_CGROUPV2_WEIGHT_MIN || + shares > VIR_CGROUPV2_WEIGHT_MAX) { virReportError(VIR_ERR_INVALID_ARG, _("shares '%llu' must be in range [%llu, %llu]"), shares, - VIR_CGROUP_CPU_SHARES_MIN, - VIR_CGROUP_CPU_SHARES_MAX); + VIR_CGROUPV2_WEIGHT_MIN, + VIR_CGROUPV2_WEIGHT_MAX); return -1; } =20 --=20 2.39.0 From nobody Sun May 19 07:31:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673948265; cv=none; d=zohomail.com; s=zohoarc; b=X7epQZcgj0eagsiuS4m/deYbydxNP79xGCGKZKr9cKamtc+5ccYZHZ4e+iGPSNPeFSqYA1K4sCCrVfK7OSLQ1dkjd3WwItyb9fb1pvam6itzbdMAbF00yDDuPZYiRqesPUbH7TBZeXRwPvI5Kt0kQ6W5aEkL38mBD1azJ2SVELM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673948265; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=N98G7gBhlDg7GLuI/BcP9R6o1dRlmP5WeSwb14McsEc=; b=ad2oZaDKWJwW0vcxHSMJMSw7uIR1PZufvX5Ve4w9KD1Mv7F9PEu7oh7G+EpnuWP/PzOq9Ez1erp/FK+EpR7hsYgAYATKhla1EBJ8xPWNQD07rQ6hOpDQnMYGSTxE/c0CgZLPKdebG0VWKVEJFcTDA/wjHSkYPkPikWKpX3tVLQo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1673948265276561.5125554181091; Tue, 17 Jan 2023 01:37:45 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-342-lJpX0YC2OSe72lcFkVidgg-1; Tue, 17 Jan 2023 04:37:40 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8C33838145B3; Tue, 17 Jan 2023 09:37:38 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 77D1914171BE; Tue, 17 Jan 2023 09:37:38 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 47F5D1946A70; Tue, 17 Jan 2023 09:37:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 65FE919465A3 for ; Tue, 17 Jan 2023 09:37:37 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 5BB7339D6D; Tue, 17 Jan 2023 09:37:37 +0000 (UTC) Received: from localhost.localdomain (ovpn-193-112.brq.redhat.com [10.40.193.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED3B87AE5 for ; Tue, 17 Jan 2023 09:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673948264; h=from:from:sender:sender: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=N98G7gBhlDg7GLuI/BcP9R6o1dRlmP5WeSwb14McsEc=; b=QeEWgHHQHcNxpkMBDLq9NPoodNyw44m4GOM8V6cfeS7o4D/Kbu7iYziWCp/BCy1W3YfiT3 E1aH1y47v2qNQf95tjiuL+xkQ8RMGANjceAwfYXs4eTwThGZCtChfvV5hXZGhlcV51QTIT 9aXzRwuxBYr0X4MHlHU+/Hq8YoP++0M= X-MC-Unique: lJpX0YC2OSe72lcFkVidgg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 2/3] domain_validate: drop cpu.shares cgroup check Date: Tue, 17 Jan 2023 10:37:26 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673948266974100003 Content-Type: text/plain; charset="utf-8"; x-default="true" This check is done when VM is defined but doesn't take into account what cgroups version is currently used on the host system so it doesn't work correctly. To make proper check at this point we would have to figure out cgroups version while defining a VM but that will still not guarantee that the VM will start correctly in the future as the host may be rebooted with different cgroups version. Signed-off-by: Pavel Hrdina Reviewed-by: Erik Skultety Reviewed-by: Martin Kletzander --- src/conf/domain_validate.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 5a9bf20d3f..39d924d4ed 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -1725,16 +1725,6 @@ virDomainDefOSValidate(const virDomainDef *def, static int virDomainDefCputuneValidate(const virDomainDef *def) { - if (def->cputune.shares > 0 && - (def->cputune.shares < VIR_CGROUP_CPU_SHARES_MIN || - def->cputune.shares > VIR_CGROUP_CPU_SHARES_MAX)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Value of cputune 'shares' must be in range [%llu= , %llu]"), - VIR_CGROUP_CPU_SHARES_MIN, - VIR_CGROUP_CPU_SHARES_MAX); - return -1; - } - CPUTUNE_VALIDATE_PERIOD(period); CPUTUNE_VALIDATE_PERIOD(global_period); CPUTUNE_VALIDATE_PERIOD(emulator_period); --=20 2.39.0 From nobody Sun May 19 07:31:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673948304; cv=none; d=zohomail.com; s=zohoarc; b=Y/sL2kgfsJngLIyU2gL6nJy7cdrqgmf9WdTOEAFRN8QAn4KDD6vBctGFFvwUfGL6gYgs56H0FEV01+JRSx80kcX4OH7oI0PKkITnJ0yqMRMTwnblMkElj+OCvldnpybfBhEdsZ4MNjynInh/i5RwaEfUIw3eXH5MgPt4M2Cira0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673948304; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HqxOfazhOuf5b5F4fkjW4+dB+FeOU9XNiA3JPVtjjRw=; b=nEZmIhXiri8vpO1Jfh4BoHW7rVTXwJ+6jqOALKuNQeJe3PcND9FybyZ+f4Fw0SLJ7kXLIQdVjr2aY9Vblxs+8GqGChyXq7uy5/IuHhR73MUVVzp525AWa+tb/WrH9xp6YlMPsCxR0b0yFhNPRaZ4bcZddrFkFOMHx7941JaE+KU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1673948304030986.2588493953014; Tue, 17 Jan 2023 01:38:24 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-271-qIlARNpdPAe9ePvCYpJn-A-1; Tue, 17 Jan 2023 04:37:43 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1BF06801779; Tue, 17 Jan 2023 09:37:40 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 07E8E492B11; Tue, 17 Jan 2023 09:37:40 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C8D9619465A4; Tue, 17 Jan 2023 09:37:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 36E601946A45 for ; Tue, 17 Jan 2023 09:37:38 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0A8CD39DB3; Tue, 17 Jan 2023 09:37:38 +0000 (UTC) Received: from localhost.localdomain (ovpn-193-112.brq.redhat.com [10.40.193.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9B9FA39D92 for ; Tue, 17 Jan 2023 09:37:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673948298; h=from:from:sender:sender: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=HqxOfazhOuf5b5F4fkjW4+dB+FeOU9XNiA3JPVtjjRw=; b=EvCl04/LbuWx6uXqLLhjqy/svQ8vlesKdxsfP1V6ifh6KJ/U7C01aSdbnG3XFtZ0h0ucDk TK1RoLwGBz/loVIS1A7h8StU8wPrnNnXbNs6JqImPa7DNZZnN7UsYi2VElIh55u/dzoadZ OyFVAljmueJmB2GWrInk4dnSsRQULp0= X-MC-Unique: qIlARNpdPAe9ePvCYpJn-A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 3/3] docs: document correct cpu shares limits with both cgroups v1 and v2 Date: Tue, 17 Jan 2023 10:37:27 +0100 Message-Id: <6171346f4a6b584cf3f8582ddb182d2d398a9cc0.1673948141.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673948305100100001 Content-Type: text/plain; charset="utf-8"; x-default="true" The limits are different with cgroups v1 and v2 but our XML documentation and virsh manpage mentioned only cgroups v1 limits without explicitly saying it only applies to cgroups v1. Signed-off-by: Pavel Hrdina Reviewed-by: Erik Skultety Reviewed-by: Martin Kletzander --- The "Since 0.9.0" applies to the whole paragraph when the attribute itself was introduced so I figured it would be confusing to add another since to mention when the cgroups v2 support was added. docs/formatdomain.rst | 2 +- docs/manpages/virsh.rst | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 490a954745..8fc8aeb928 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -849,7 +849,7 @@ CPU Tuning There is no unit for the value, it's a relative measure based on the se= tting of other VM, e.g. A VM configured with value 2048 will get twice as muc= h CPU time as a VM configured with value 1024. The value should be in range - [2, 262144]. :since:`Since 0.9.0` + [2, 262144] using cgroups v1, [1, 10000] using cgroups v2. :since:`Sinc= e 0.9.0` ``period`` The optional ``period`` element specifies the enforcement interval (uni= t: microseconds). Within ``period``, each vCPU of the domain will not be a= llowed diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 88b7fa1da8..d5b614dc03 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -4054,7 +4054,8 @@ If *--config* is specified, affect the next start of = a persistent guest. If *--current* is specified, it is equivalent to either *--live* or *--config*, depending on the current state of the guest. =20 -``Note``: The cpu_shares parameter has a valid value range of 2-262144. +``Note``: The cpu_shares parameter has a valid value range of 2-262144 +with cgroups v1, 1-10000 with cgroups v2. =20 ``Note``: The weight and cap parameters are defined only for the XEN_CREDIT scheduler. --=20 2.39.0