Please enable JavaScript.
Coggle requires JavaScript to display documents.
UBLK_F_BATCH_IO IO hang issue - Coggle Diagram
UBLK_F_BATCH_IO IO hang issue
reproducer
8 jobs, page copy, 16 queues, null
run fio/t/io_uring -p0 -n8 -r20
./kulbk del -n 0
hang in blk_mq_freeze_queue()
triggered in both single or two fetch commands
observation
IO is in FIFO
ACTIVE is set
not get dispatched
can be avoided by holding lock in dispatch code path (?)
can be reproduced with 1 or 2 fcmds
current model
queue_rqs
FIFO in + acquire_fcmd() + lock
acquire_fcmd() is always done with lock
acquire can only succeed iff ->act_fcmd is NULL
dispatch
FIFO out + release_fcmd() lockless
single dispatch code path
release fcmd + mb() + check fifo
release_fcmd() is unconditional
could become NULL before release_fcmd()?
not possible
only two releases
both are serialized
another one is in ublk_batch_deinit_fetch_buf
new fcmd will be issued for fetching commands
what is the problem with this model?
design
->active_fcmd is one token or queue flag
only one code path can dispatch with this token
is it safe to call uring tw in its previous tw handler?
ucmd and fcmd is bound in the ucmd handler
other solutions
still lockless single consumer model