]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: fix potential stall during CPU unplug with IO pending
authorJens Axboe <axboe@fb.com>
Sat, 5 Apr 2014 03:34:48 +0000 (21:34 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 7 Apr 2014 14:17:18 +0000 (08:17 -0600)
commitd53474118ce9c562cde0584712aace420fb438ab
tree7c745e10cab2c6cd91dbe2d8664601dda6d89a68
parent53e1b605d6d3994af2ff70111d471f120b8509b1
blk-mq: fix potential stall during CPU unplug with IO pending

When a CPU is unplugged, we move the blk_mq_ctx request entries
to the current queue. The current code forgets to remap the
blk_mq_hw_ctx before marking the software context pending,
which breaks if old-cpu and new-cpu don't map to the same
hardware queue.

Additionally, if we mark entries as pending in the new
hardware queue, then make sure we schedule it for running.
Otherwise request could be sitting there until someone else
queues IO for that hardware queue.

Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c