aboutsummaryrefslogtreecommitdiff
path: root/lib/test-string_helpers.c
diff options
context:
space:
mode:
authorChong Yuan <[email protected]>2015-04-15 11:39:29 -0600
committerJens Axboe <[email protected]>2015-04-15 11:39:29 -0600
commit889fa31f00b218a2cef96c32a6b3f57e6d3bf918 (patch)
tree12338bd403f6fd84d8e2b98624aceaa3a4b9998b /lib/test-string_helpers.c
parentdc48e56d761610da4ea1088d1bea0a030b8e3e43 (diff)
blk-mq: reduce unnecessary software queue looping
In flush_busy_ctxs() and blk_mq_hctx_has_pending(), regardless of how many ctxs assigned to one hctx, they will all loop hctx->ctx_map.map_size times. Here hctx->ctx_map.map_size is a const ALIGN(nr_cpu_ids, 8) / 8. Especially, flush_busy_ctxs() is in hot code path. And it's unnecessary. Change ->map_size to contain the actually mapped software queues, so we only loop for as many iterations as we have to. And remove cpumask setting and nr_ctx count in blk_mq_init_cpu_queues() since they are all re-done in blk_mq_map_swqueue(). blk_mq_map_swqueue(). Signed-off-by: Chong Yuan <[email protected]> Reviewed-by: Wenbo Wang <[email protected]> Updated by me for formatting and commenting. Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions