diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 8ef875909eb0a204222cf0df8b1020e90cccfa52..73778cfe8ebe2a39cce21f1e67c3048f7573a663 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4450,6 +4450,8 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) if (likely(cfs_rq->runtime_remaining > 0)) return; + if (cfs_rq->throttled) + return; /* * if we're unable to extend our runtime we resched so that the active * hierarchy can be throttled @@ -4653,6 +4655,9 @@ static u64 distribute_cfs_runtime(struct cfs_bandwidth *cfs_b, if (!cfs_rq_throttled(cfs_rq)) goto next; + /* By the above check, this should never be true */ + SCHED_WARN_ON(cfs_rq->runtime_remaining > 0); + runtime = -cfs_rq->runtime_remaining + 1; if (runtime > remaining) runtime = remaining;