From: Oguz Bektas <o.bektas@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] pvestatd: fix rebalancing cpusets for cgroupv2
Date: Thu, 14 Oct 2021 08:51:48 +0200 [thread overview]
Message-ID: <20211014065148.281336-1-o.bektas@proxmox.com> (raw)
currently we only check the entry for cgroup v1 to decide if cores
should be rebalanced. extend the check to include cgroup v2 entries.
reported in forum [0]
[0]: https://forum.proxmox.com/threads/hard-set-streams-for-lxc-container.97768/
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
PVE/Service/pvestatd.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm
index 7193388c..26d96bb2 100755
--- a/PVE/Service/pvestatd.pm
+++ b/PVE/Service/pvestatd.pm
@@ -343,8 +343,9 @@ sub rebalance_lxc_containers {
my @cpuset_members = $cpuset->members();
- if (!PVE::LXC::Config->has_lxc_entry($conf, 'lxc.cgroup.cpuset.cpus')) {
-
+ if (!PVE::LXC::Config->has_lxc_entry($conf, 'lxc.cgroup.cpuset.cpus')
+ && !PVE::LXC::Config->has_lxc_entry($conf, 'lxc.cgroup2.cpuset.cpus')
+ ) {
my $cores = $conf->{cores} || $cpucount;
$cores = $cpucount if $cores > $cpucount;
--
2.30.2
next reply other threads:[~2021-10-14 6:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 6:51 Oguz Bektas [this message]
2021-10-19 12:01 ` Aaron Lauterer
2021-10-20 14:47 ` [pve-devel] applied: " Thomas Lamprecht
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=20211014065148.281336-1-o.bektas@proxmox.com \
--to=o.bektas@proxmox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox