diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 5db05f6fb470..397317248ddd 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -6335,6 +6335,30 @@ static void calc_global_load_remove(struct rq *rq) | |||
6335 | rq->calc_load_active = 0; | 6335 | rq->calc_load_active = 0; |
6336 | } | 6336 | } |
6337 | 6337 | ||
6338 | #ifdef CONFIG_CFS_BANDWIDTH | ||
6339 | static void unthrottle_offline_cfs_rqs(struct rq *rq) | ||
6340 | { | ||
6341 | struct cfs_rq *cfs_rq; | ||
6342 | |||
6343 | for_each_leaf_cfs_rq(rq, cfs_rq) { | ||
6344 | struct cfs_bandwidth *cfs_b = tg_cfs_bandwidth(cfs_rq->tg); | ||
6345 | |||
6346 | if (!cfs_rq->runtime_enabled) | ||
6347 | continue; | ||
6348 | |||
6349 | /* | ||
6350 | * clock_task is not advancing so we just need to make sure | ||
6351 | * there's some valid quota amount | ||
6352 | */ | ||
6353 | cfs_rq->runtime_remaining = cfs_b->quota; | ||
6354 | if (cfs_rq_throttled(cfs_rq)) | ||
6355 | unthrottle_cfs_rq(cfs_rq); | ||
6356 | } | ||
6357 | } | ||
6358 | #else | ||
6359 | static void unthrottle_offline_cfs_rqs(struct rq *rq) {} | ||
6360 | #endif | ||
6361 | |||
6338 | /* | 6362 | /* |
6339 | * Migrate all tasks from the rq, sleeping tasks will be migrated by | 6363 | * Migrate all tasks from the rq, sleeping tasks will be migrated by |
6340 | * try_to_wake_up()->select_task_rq(). | 6364 | * try_to_wake_up()->select_task_rq(). |
@@ -6360,6 +6384,9 @@ static void migrate_tasks(unsigned int dead_cpu) | |||
6360 | */ | 6384 | */ |
6361 | rq->stop = NULL; | 6385 | rq->stop = NULL; |
6362 | 6386 | ||
6387 | /* Ensure any throttled groups are reachable by pick_next_task */ | ||
6388 | unthrottle_offline_cfs_rqs(rq); | ||
6389 | |||
6363 | for ( ; ; ) { | 6390 | for ( ; ; ) { |
6364 | /* | 6391 | /* |
6365 | * There's this thread running, bail when that's the only | 6392 | * There's this thread running, bail when that's the only |