On Thu, 14 Aug 2025 13:54:56 +0530, Nilay Shroff wrote: > This patchset replaces the use of a static key in the I/O path (rq_qos_ > xxx()) with an atomic queue flag (QUEUE_FLAG_QOS_ENABLED). This change > is made to eliminate a potential deadlock introduced by the use of static > keys in the blk-rq-qos infrastructure, as reported by lockdep during > blktests block/005[1]. > > The original static key approach was introduced to avoid unnecessary > dereferencing of q->rq_qos when no blk-rq-qos module (e.g., blk-wbt or > blk-iolatency) is configured. While efficient, enabling a static key at > runtime requires taking cpu_hotplug_lock and jump_label_mutex, which > becomes problematic if the queue is already frozen — causing a reverse > dependency on ->freeze_lock. This results in a lockdep splat indicating > a potential deadlock. > > [...] Applied, thanks! [1/3] block: skip q->rq_qos check in rq_qos_done_bio() commit: 275332877e2fa9d6efa7402b1e897f6c6ee695bb [2/3] block: decrement block_rq_qos static key in rq_qos_del() commit: ade1beea1c27657712aa8f594226d461639382ff [3/3] block: avoid cpu_hotplug_lock depedency on freeze_lock commit: 370ac285f23aecae40600851fb4a1a9e75e50973 Best regards, -- Jens Axboe