lkml.org 
[lkml]   [2018]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 13/60] sched: Remove useless checks for root task-group
Date
The functions sync_throttle() and unregister_fair_sched_group() are
called during the creation and destruction of cgroups. They are never
called for the root task-group. Remove checks that always yield the
same result when operating on non-root task groups.

Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
---
kernel/sched/fair.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 5d6225aedbfe..5cad364e3a88 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4716,9 +4716,6 @@ static void sync_throttle(struct task_group *tg, int cpu)
if (!cfs_bandwidth_used())
return;

- if (!tg->parent)
- return;
-
cfs_rq = tg->cfs_rq[cpu];
pcfs_rq = tg->parent->cfs_rq[cpu];

@@ -9881,8 +9878,7 @@ void unregister_fair_sched_group(struct task_group *tg)
int cpu;

for_each_possible_cpu(cpu) {
- if (tg->cfs_rq[cpu]->my_se)
- remove_entity_load_avg(tg->cfs_rq[cpu]->my_se);
+ remove_entity_load_avg(tg->cfs_rq[cpu]->my_se);

/*
* Only empty task groups can be destroyed; so we can speculatively
--
2.9.3.1.gcba166c.dirty
\
 
 \ /
  Last update: 2018-09-07 23:47    [W:0.679 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site