diff options
| author | Nilay Shroff <[email protected]> | 2025-08-14 08:24:58 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2025-08-21 13:11:11 +0000 |
| commit | ade1beea1c27657712aa8f594226d461639382ff (patch) | |
| tree | c842ba38bf7f656e198c80522c7d4216661fed05 /drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c | |
| parent | block: skip q->rq_qos check in rq_qos_done_bio() (diff) | |
| download | kernel-ade1beea1c27657712aa8f594226d461639382ff.tar.gz kernel-ade1beea1c27657712aa8f594226d461639382ff.zip | |
block: decrement block_rq_qos static key in rq_qos_del()
rq_qos_add() increments the block_rq_qos static key when a QoS
policy is attached. When a QoS policy is removed via rq_qos_del(),
we must symmetrically decrement the static key. If this removal drops
the last QoS policy from the queue (q->rq_qos becomes NULL), the
static branch can be disabled and the jump label patched to a NOP,
avoiding overhead on the hot path.
This change ensures rq_qos_add()/rq_qos_del() keep the
block_rq_qos static key balanced and prevents leaving the branch
permanently enabled after the last policy is removed.
Fixes: 033b667a823e ("block: blk-rq-qos: guard rq-qos helpers by static key")
Signed-off-by: Nilay Shroff <[email protected]>
Reviewed-by: Ming Lei <[email protected]>
Reviewed-by: Yu Kuai <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c')
0 files changed, 0 insertions, 0 deletions
