[Devel] [PATCH RHEL7 COMMIT] bc: don't verify "numproc" ub help on bc destroy
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Aug 14 13:12:33 MSK 2018
The commit is pushed to "branch-rh7-3.10.0-862.9.1.vz7.70.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.9.1.vz7.70.5
------>
commit 511f7eb36ea69360972e5111ee29025300ed812b
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date: Tue Aug 14 12:17:37 2018 +0300
bc: don't verify "numproc" ub help on bc destroy
We don't have to check "numproc" ub for correctness on ub
destroy because pid cgroup does it for us.
BTW, currently it's done in a wrong way anyway - ub held
value is not synced with cgroup value before the check.
Fixes: 5d040bf27681 ("bc: implement ubc "numproc" limit based on pids
cgroup")
https://jira.sw.ru/browse/PSBM-87662
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
kernel/bc/beancounter.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/bc/beancounter.c b/kernel/bc/beancounter.c
index 4c6d1b7f5f25..2cc0bca5b353 100644
--- a/kernel/bc/beancounter.c
+++ b/kernel/bc/beancounter.c
@@ -486,6 +486,9 @@ static inline int bc_verify_held(struct user_beancounter *ub)
ub->ub_parms[UB_DGRAMRCVBUF].held = 0;
ub->ub_parms[UB_NUMOTHERSOCK].held = 0;
+ /* accounted by pid cgroup */
+ ub->ub_parms[UB_NUMPROC].held = 0;
+
clean = 1;
for (i = 0; i < UB_RESOURCES; i++)
clean &= verify_res(ub, ub_rnames[i], ub->ub_parms[i].held);
More information about the Devel
mailing list