• M
    blk-mq: introduce new lock for protecting hctx->dispatch_wait · 5815839b
    Ming Lei 提交于
    Now hctx->lock is only acquired when adding hctx->dispatch_wait to
    one wait queue, but not held when removing it from the wait queue.
    
    IO hang can be observed easily if SCHED RESTART is disabled, that means
    now RESTART exits just for fixing the issue in blk_mq_mark_tag_wait().
    
    This patch fixes the issue by introducing hctx->dispatch_wait_lock and
    holding it for removing hctx->dispatch_wait in blk_mq_dispatch_wake(),
    since we need to avoid acquiring hctx->lock in irq context.
    
    Fixes: eb619fdb ("blk-mq: fix issue with shared tag queue re-running")
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Omar Sandoval <osandov@fb.com>
    Cc: Bart Van Assche <bart.vanassche@wdc.com>
    Tested-by: NAndrew Jones <drjones@redhat.com>
    Signed-off-by: NMing Lei <ming.lei@redhat.com>
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    5815839b
blk-mq.h 9.1 KB