On 2022/10/24 21:35, Bart Van Assche wrote:
On 10/23/22 18:57, Chao Leng wrote:
blk_mq_quiesce_tagset() support concurrency. blk_mq_quiesce_tagset() just
check the flag(QUEUE_FLAG_SKIP_TAGSET_QUIESCE), it has no impact on concurrency.
Hi Chao,
I think it depends on how the QUEUE_FLAG_SKIP_TAGSET_QUIESCE flag is set. I agree if that flag is set once and never modified that there is no race. What I'm wondering about is whether there could be a need for block drivers to set the QUEUE_FLAG_SKIP_TAGSET_QUIESCE flag just before blk_mq_quiesce_tagset() is called and cleared immediately after blk_mq_quiesce_tagset() returns? In that case I think there is a race condition.
Even if dynamically modify the QUEUE_FLAG_SKIP_TAGSET_QUIESCE, it still has no
impact on concurrency of blk_mq_quiesce_tagset(). It may affect atomicity of
blk_mq_quiesce_tagset(), blk_mq_quiesce_tagset() do not ensure atomicity, the caller
should ensure it if needed.