From nobody Mon Feb 9 03:31:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1614778539; cv=none; d=zohomail.com; s=zohoarc; b=Ek5BBzyOnJ+d1W1Kdu6a/84NoSnTHy+P9SROnmC0biCcXs48mAxFqYzBISWzH1LwSCaOYnJ1r/Q/gLy3L+UXLB+o+hEsJ/CvEGdL/huE0Z481sQDQnUIlWd5+txUz8/bdaVg2hOR3EMYfFkGc/2tDJoCZya1LTeQM+C4bKoSbc8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614778539; 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=J6IX6xypEcDBQ6DhNzmjuHKZPkbh9ZZSqy4zxyb5CKQ=; b=RGh+0K0pOUj1DZ87B0cTIhWlgO8CAU3EUa/wtQqmDnKk4CPpZyp7VicvG/5PQLvCuxKOmAsP+VbjoB8nRO4uJbJWOws5AVrIiZcGn41iaoBxqyTmdDwt3Qbp39h8saCMIOqqYdR5a+UTZ4O0o6Vhwg4omhENkYsnhbODSKYNFOo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1614778539812513.2206462026295; Wed, 3 Mar 2021 05:35:39 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-368-JVG7IFolM6uDNEP6uZAZgQ-1; Wed, 03 Mar 2021 08:35:36 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9B9AC1020C26; Wed, 3 Mar 2021 13:35:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 76EED6062F; Wed, 3 Mar 2021 13:35:30 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 32F919985; Wed, 3 Mar 2021 13:35:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 123DZTQR026471 for ; Wed, 3 Mar 2021 08:35:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3FA9C10023B0; Wed, 3 Mar 2021 13:35:29 +0000 (UTC) Received: from antique-work.lan (unknown [10.40.192.96]) by smtp.corp.redhat.com (Postfix) with ESMTP id B150D100239A for ; Wed, 3 Mar 2021 13:35:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614778538; 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=J6IX6xypEcDBQ6DhNzmjuHKZPkbh9ZZSqy4zxyb5CKQ=; b=EFm9gxXyzADWxqi2W12d7R9H6wOpP5BM9c07S5af7Rs+BZKgsJmF6VnR1F+FhaBUGdnUvN 2PwxtmbCbICtQRyj8kfc804EZh5bkQjFNbu5U+hKs0aCWpsqljNSd0IoEkWtwcpEflXmRX gHIijKnEwKnrACI5zl8BbNgrijgM8Ak= X-MC-Unique: JVG7IFolM6uDNEP6uZAZgQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 3/3] vircgroup: drop unused function virCgroupSetupCpuShares Date: Wed, 3 Mar 2021 14:35:22 +0100 Message-Id: <268b7889801d6f17238575a53f10581d5559cf36.1614778388.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Previous commit removed all usage of this function so we can remove it. Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 1 - src/util/vircgroup.c | 20 -------------------- src/util/vircgroup.h | 2 -- 3 files changed, 23 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 2a3bbdc577..3e7de7744e 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1934,7 +1934,6 @@ virCgroupSetupBlkioDeviceWriteBps; virCgroupSetupBlkioDeviceWriteIops; virCgroupSetupCpuPeriodQuota; virCgroupSetupCpusetCpus; -virCgroupSetupCpuShares; virCgroupSupportsCpuBW; virCgroupTerminateMachine; =20 diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index abc06b8cb0..5b6097c335 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -3899,26 +3899,6 @@ virCgroupSetupCpusetCpus(virCgroupPtr cgroup, virBit= mapPtr cpumask) } =20 =20 -/* Per commit 97814d8ab3, the Linux kernel can consider a 'shares' - * value of '0' and '1' as 2, and any value larger than a maximum - * is reduced to maximum. - * - * The 'realValue' pointer holds the actual 'shares' value set by - * the kernel if the function returned success. */ -int -virCgroupSetupCpuShares(virCgroupPtr cgroup, unsigned long long shares, - unsigned long long *realValue) -{ - if (virCgroupSetCpuShares(cgroup, shares) < 0) - return -1; - - if (virCgroupGetCpuShares(cgroup, realValue) < 0) - return -1; - - return 0; -} - - int virCgroupSetupCpuPeriodQuota(virCgroupPtr cgroup, unsigned long long period, diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h index 7d9172d664..4e6911f34c 100644 --- a/src/util/vircgroup.h +++ b/src/util/vircgroup.h @@ -227,8 +227,6 @@ virCgroupGetDomainTotalCpuStats(virCgroupPtr group, =20 int virCgroupSetCpuShares(virCgroupPtr group, unsigned long long shares); int virCgroupGetCpuShares(virCgroupPtr group, unsigned long long *shares); -int virCgroupSetupCpuShares(virCgroupPtr cgroup, unsigned long long shares, - unsigned long long *realValue); =20 #define VIR_CGROUP_CPU_SHARES_MIN 2LL #define VIR_CGROUP_CPU_SHARES_MAX 262144LL --=20 2.29.2