Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

blk-mq: I/O and timer unplugs are inverted in blktrace

trace_block_unplug() takes true for explicit unplugs and false for
implicit unplugs. schedule() unplugs are implicit and should be
reported as timer unplugs. While correct in the legacy code, this has
been inverted in blk-mq since 4.11.

Cc: stable@vger.kernel.org
Fixes: bd166ef183c2 ("blk-mq-sched: add framework for MQ capable IO schedulers")
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Ilya Dryomov and committed by
Jens Axboe
587562d0 0f843e65

+2 -2
+2 -2
block/blk-mq.c
··· 1628 1628 BUG_ON(!rq->q); 1629 1629 if (rq->mq_ctx != this_ctx) { 1630 1630 if (this_ctx) { 1631 - trace_block_unplug(this_q, depth, from_schedule); 1631 + trace_block_unplug(this_q, depth, !from_schedule); 1632 1632 blk_mq_sched_insert_requests(this_q, this_ctx, 1633 1633 &ctx_list, 1634 1634 from_schedule); ··· 1648 1648 * on 'ctx_list'. Do those. 1649 1649 */ 1650 1650 if (this_ctx) { 1651 - trace_block_unplug(this_q, depth, from_schedule); 1651 + trace_block_unplug(this_q, depth, !from_schedule); 1652 1652 blk_mq_sched_insert_requests(this_q, this_ctx, &ctx_list, 1653 1653 from_schedule); 1654 1654 }