Re: [PATCH] sched/fair: Fix non-empty throttled_limbo_list warning in tg_throttle_down()

From: Hao Jia

Date: Fri Oct 24 2025 - 02:59:22 EST



Hi Prateek,

On 2025/10/24 12:36, K Prateek Nayak wrote:
Hello Hao,

On 10/23/2025 5:42 PM, Hao Jia wrote:
@@ -5287,7 +5287,9 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
se->on_rq = 1;
if (cfs_rq->nr_queued == 1) {
- check_enqueue_throttle(cfs_rq);
+ if (!(flags & ENQUEUE_THROTTLE))
+ check_enqueue_throttle(cfs_rq);
+

So my only concern here is:

check_enqueue_throttle()
account_cfs_rq_runtime()
__account_cfs_rq_runtime()
assign_cfs_rq_runtime()
__assign_cfs_rq_runtime()
start_cfs_bandwidth() /* Starts the BW timer. */

If we skip it, we wouldn't know we've run out of bandwidth until the
hierarchy is picked which would cause additional delay until the
bandwidth is replenished.

At the very least, we should pass the enqueue flags to
check_enqueue_throttle() and only skip the throttle_cfs_rq() part if
we spot ENQUEUE_THROTTLE.

Thoughts?


Thanks for your suggestion. This is indeed a potential risk, and it will do it in the next version.

Thanks,
Hao