all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-common 3/4] bugfix: cpushares : default value is 1024 for cgroup v1
Date: Fri, 30 Oct 2020 10:42:16 +0100	[thread overview]
Message-ID: <20201030094217.53131-4-aderumier@odiso.com> (raw)
In-Reply-To: <20201030094217.53131-1-aderumier@odiso.com>

Currently if we delete cpuunit (undef), the default value is 100
---
 src/PVE/CGroup.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/CGroup.pm b/src/PVE/CGroup.pm
index f542b3a..4823be2 100644
--- a/src/PVE/CGroup.pm
+++ b/src/PVE/CGroup.pm
@@ -465,7 +465,7 @@ sub change_cpu_shares {
 	die "cpu weight (shares) must be in range [1, 10000]\n" if $shares < 1 || $shares > 10000;
 	PVE::ProcFSTools::write_proc_entry("$path/cpu.weight", $shares);
     } elsif ($ver == 1) {
-	$shares //= 100;
+	$shares //= 1024;
 	PVE::ProcFSTools::write_proc_entry("$path/cpu.shares", $shares // $cgroupv1_default);
     } else {
 	die "bad cgroup version: $ver\n";
-- 
2.20.1




  parent reply	other threads:[~2020-10-30  9:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30  9:42 [pve-devel] [PATCH pve-common 0/4] add generic CGroup module Alexandre Derumier
2020-10-30  9:42 ` [pve-devel] [PATCH pve-common 1/4] move PVE::LXC::CGroup to PVE::CGroup Alexandre Derumier
2020-10-30  9:42 ` [pve-devel] [PATCH pve-common 2/4] Cgroups: remove specific lxc code Alexandre Derumier
2020-11-05 10:35   ` Wolfgang Bumiller
2020-10-30  9:42 ` Alexandre Derumier [this message]
2020-10-30  9:42 ` [pve-devel] [PATCH pve-common 4/4] systemd: add CPUWeight encoding Alexandre Derumier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201030094217.53131-4-aderumier@odiso.com \
    --to=aderumier@odiso.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal