]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vircgroup: drop unused function virCgroupSetupCpuShares
authorPavel Hrdina <phrdina@redhat.com>
Wed, 3 Mar 2021 13:29:22 +0000 (14:29 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Thu, 4 Mar 2021 10:13:31 +0000 (11:13 +0100)
Previous commit removed all usage of this function so we can remove it.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/libvirt_private.syms
src/util/vircgroup.c
src/util/vircgroup.h

index 2a3bbdc577a05c09530048bbc6fcb5310a39b1c2..3e7de7744ed220d7bdb45c74bbaa14fd99977ac4 100644 (file)
@@ -1934,7 +1934,6 @@ virCgroupSetupBlkioDeviceWriteBps;
 virCgroupSetupBlkioDeviceWriteIops;
 virCgroupSetupCpuPeriodQuota;
 virCgroupSetupCpusetCpus;
-virCgroupSetupCpuShares;
 virCgroupSupportsCpuBW;
 virCgroupTerminateMachine;
 
index abc06b8cb0d1a11fa9f16ca90f55aafe9bc98e0e..5b6097c3356826f8c5206e4b8709d88f59346289 100644 (file)
@@ -3899,26 +3899,6 @@ virCgroupSetupCpusetCpus(virCgroupPtr cgroup, virBitmapPtr cpumask)
 }
 
 
-/* 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,
index 7d9172d664f5d8e894896ec5643e5cd9a17afb54..4e6911f34c63cde1a636b843cf346db21163bc9d 100644 (file)
@@ -227,8 +227,6 @@ virCgroupGetDomainTotalCpuStats(virCgroupPtr group,
 
 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);
 
 #define VIR_CGROUP_CPU_SHARES_MIN 2LL
 #define VIR_CGROUP_CPU_SHARES_MAX 262144LL