[Devel] [PATCH RHEL7 COMMIT] sched/ve: Iterate only VE root cpu cgroups to count loadavg
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Feb 27 15:28:30 MSK 2018
The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.45.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.17.1.vz7.45.4
------>
commit d1ad42524d70880b2402979f5051e329d79f5eed
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Tue Feb 27 15:28:30 2018 +0300
sched/ve: Iterate only VE root cpu cgroups to count loadavg
Counting loadavg we are interested in VE root cpu cgroup only,
as it's analogy of node's loadavg.
So, this patch makes iterate only such types of cpu cgroup,
when we calc loadavg.
Since this code called from interrupt, this may give positive
performance resuts.
https://jira.sw.ru/browse/PSBM-81572
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
Reviewed-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index cc01aff0e6ea..f93334fd0229 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2890,7 +2890,7 @@ static void calc_load_ve(void)
int i;
rcu_read_lock();
- list_for_each_entry_rcu(tg, &task_groups, list) {
+ list_for_each_entry_rcu(tg, &ve_root_list, ve_root_list) {
nr_active = 0;
for_each_possible_cpu(i) {
#ifdef CONFIG_FAIR_GROUP_SCHED
More information about the Devel
mailing list