[Devel] [PATCH 4/5] sched/ve: Iterate only VE root cpu cgroups to count loadavg

Kirill Tkhai ktkhai at virtuozzo.com
Tue Feb 20 18:09:59 MSK 2018


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>
---
 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