]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: simplify queue mapping & schedule with each possisble CPU
authorChristoph Hellwig <hch@lst.de>
Fri, 12 Jan 2018 02:53:06 +0000 (10:53 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 12 Jan 2018 18:01:40 +0000 (11:01 -0700)
commit4ed8f55b5dcf803d69d3a1f7f76b247106658e9d
treeb6ba68628816661204010388c68416be56ceefb7
parent8491d950c89a677bd1be5bffefdb64da7143b0ab
blk-mq: simplify queue mapping & schedule with each possisble CPU

The previous patch assigns interrupt vectors to all possible CPUs, so
now hctx can be mapped to possible CPUs, this patch applies this fact
to simplify queue mapping & schedule so that we don't need to handle
CPU hotplug for dealing with physical CPU plug & unplug. With this
simplication, we can work well on physical CPU plug & unplug, which
is a normal use case for VM at least.

Make sure we allocate blk_mq_ctx structures for all possible CPUs, and
set hctx->numa_node for possible CPUs which are mapped to this hctx. And
only choose the online CPUs for schedule.

Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Fixes: 283a20aabf28 ("blk-mq: Create hctx for each present CPU")
(merged the three into one because any single one may not work, and fix
selecting online CPUs for scheduler)
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c