Unverified Commit edca7a0b authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents 37a95954 e548af13
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -5267,6 +5267,19 @@ static void distribute_cfs_runtime(struct cfs_bandwidth *cfs_b)
		if (!cfs_rq_throttled(cfs_rq))
			goto next;

		/*
		 * CPU hotplug callbacks race against distribute_cfs_runtime()
		 * when the QOS_SCHED feature is enabled, there may be
		 * situations where the runtime_remaining > 0.
		 * Qos_sched does not care whether the cfs_rq has time left,
		 * so no longer allocate time to cfs_rq in this scenario.
		 */
#ifdef CONFIG_QOS_SCHED
		if (cfs_rq->throttled == QOS_THROTTLED &&
			cfs_rq->runtime_remaining > 0)
			goto next;
#endif

		/* By the above check, this should never be true */
		SCHED_WARN_ON(cfs_rq->runtime_remaining > 0);

@@ -7923,6 +7936,10 @@ static __always_inline bool check_qos_cfs_rq(struct cfs_rq *cfs_rq)
	if (unlikely(cfs_rq && is_offline_level(cfs_rq->tg->qos_level) &&
		!sched_idle_cpu(smp_processor_id()) &&
		cfs_rq->h_nr_running == cfs_rq->idle_h_nr_running)) {

		if (!rq_of(cfs_rq)->online)
			return false;

		throttle_qos_cfs_rq(cfs_rq);
		return true;
	}