Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269154
b: refs/heads/master
c: 8cb120d
h: refs/heads/master
v: v3
  • Loading branch information
Paul Turner authored and Ingo Molnar committed Aug 14, 2011
1 parent ad7de5b commit 34ba958
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5238cdd3873e67a98b28c1161d65d2a615c320a3
refs/heads/master: 8cb120d3e41a0464a559d639d519cef563717a4e
27 changes: 27 additions & 0 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -6335,6 +6335,30 @@ static void calc_global_load_remove(struct rq *rq)
rq->calc_load_active = 0;
}

#ifdef CONFIG_CFS_BANDWIDTH
static void unthrottle_offline_cfs_rqs(struct rq *rq)
{
struct cfs_rq *cfs_rq;

for_each_leaf_cfs_rq(rq, cfs_rq) {
struct cfs_bandwidth *cfs_b = tg_cfs_bandwidth(cfs_rq->tg);

if (!cfs_rq->runtime_enabled)
continue;

/*
* clock_task is not advancing so we just need to make sure
* there's some valid quota amount
*/
cfs_rq->runtime_remaining = cfs_b->quota;
if (cfs_rq_throttled(cfs_rq))
unthrottle_cfs_rq(cfs_rq);
}
}
#else
static void unthrottle_offline_cfs_rqs(struct rq *rq) {}
#endif

/*
* Migrate all tasks from the rq, sleeping tasks will be migrated by
* try_to_wake_up()->select_task_rq().
Expand All @@ -6360,6 +6384,9 @@ static void migrate_tasks(unsigned int dead_cpu)
*/
rq->stop = NULL;

/* Ensure any throttled groups are reachable by pick_next_task */
unthrottle_offline_cfs_rqs(rq);

for ( ; ; ) {
/*
* There's this thread running, bail when that's the only
Expand Down

0 comments on commit 34ba958

Please sign in to comment.