Hi, >> static inline bool blk_throtl_activated(struct request_queue *q) >> { >> - return q->td != NULL; >> + return q->td != NULL && test_bit(blkcg_policy_throtl.plid, q->blkcg_pols); >> } > > You can just remove the fist checking, p->td must be set if policy is > enabled. And please make blkcg_policy_enabled() inline function in > blk-cgroup.h and use it here. We intentionally kept the q->td != NULL check because we cannot guarantee that the policy module is fully loaded when this function is called. If the policy module is not loaded yet, blkcg_policy_throtl.plid might not be assigned, which could cause the test_bit() check to be incorrect. By keeping this check, we ensure that we have at least reached the cgroup configuration flow, indicating that the policy loading is complete. I'm wondering if there are any risks here and whether we should remove the q->td != NULL check? Thanks, Han Guangjiang