projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9465abe
)
bugfix: cpushares : default value is 1024 for cgroup v1
author
Alexandre Derumier
<aderumier@odiso.com>
Fri, 6 Nov 2020 08:24:54 +0000
(09:24 +0100)
committer
Thomas Lamprecht
<t.lamprecht@proxmox.com>
Fri, 6 Nov 2020 08:31:11 +0000
(09:31 +0100)
Currently if we delete cpuunit (undef), the default value is 100
src/PVE/CGroup.pm
patch
|
blob
|
blame
|
history
diff --git
a/src/PVE/CGroup.pm
b/src/PVE/CGroup.pm
index 45b9e7c12a0b7a426b09851e64caf5d5d97dd987..71d084627855067724770bb91d91f29f12340d17 100644
(file)
--- a/
src/PVE/CGroup.pm
+++ b/
src/PVE/CGroup.pm
@@
-472,7
+472,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 //= 10
0
;
+ $shares //= 10
24
;
PVE::ProcFSTools::write_proc_entry("$path/cpu.shares", $shares // $cgroupv1_default);
} else {
die "bad cgroup version: $ver\n";