On 11/1/21 6:41 AM, Jens Axboe wrote: > On 11/1/21 2:34 AM, Shinichiro Kawasaki wrote: >> I tried the latest linux-block/for-next branch tip (git hash b43fadb6631f and >> observed a process hang during blktests block/005 run on a NVMe device. >> Kernel message reported "INFO: task check:1224 blocked for more than 122 >> seconds." with call trace [1]. So far, the hang is 100% reproducible with my >> system. This hang is not observed with HDDs or null_blk devices. >> >> I bisected and found the commit 4f5022453acd ("nvme: wire up completion batching >> for the IRQ path") triggers the hang. When I revert this commit from the >> for-next branch tip, the hang disappears. The block/005 test case does IO >> scheduler switch during IO, and the completion path change by the commit looks >> affecting the scheduler switch. Comments for solution will be appreciated. > > I'll take a look at this. I've tried running various things most of the day, and I cannot reproduce this issue nor do I see what it could be. Even if requests are split between batched completion and one-by-one completion, it works just fine for me. No special care needs to be taken for put_many() on the queue reference, as the wake_up() happens for the ref going to zero. Tell me more about your setup. What does the runtimes of the test look like? Do you have all schedulers enabled? What kind of NVMe device is this? FWIW, this is upstream now, so testing with Linus -git would be preferable. -- Jens Axboe