Commit 20e4d81
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: 4b855ad ("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>1 parent 84676c1 commit 20e4d81
1 file changed
+8
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
| 443 | + | |
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| |||
1324 | 1324 | | |
1325 | 1325 | | |
1326 | 1326 | | |
1327 | | - | |
| 1327 | + | |
| 1328 | + | |
1328 | 1329 | | |
1329 | | - | |
| 1330 | + | |
1330 | 1331 | | |
1331 | 1332 | | |
1332 | 1333 | | |
| |||
2220 | 2221 | | |
2221 | 2222 | | |
2222 | 2223 | | |
2223 | | - | |
2224 | | - | |
2225 | | - | |
2226 | | - | |
2227 | | - | |
2228 | | - | |
2229 | 2224 | | |
2230 | 2225 | | |
2231 | 2226 | | |
2232 | 2227 | | |
| 2228 | + | |
2233 | 2229 | | |
2234 | 2230 | | |
2235 | 2231 | | |
| |||
2286 | 2282 | | |
2287 | 2283 | | |
2288 | 2284 | | |
2289 | | - | |
| 2285 | + | |
2290 | 2286 | | |
2291 | 2287 | | |
2292 | 2288 | | |
| |||
2340 | 2336 | | |
2341 | 2337 | | |
2342 | 2338 | | |
2343 | | - | |
| 2339 | + | |
| 2340 | + | |
2344 | 2341 | | |
2345 | 2342 | | |
2346 | 2343 | | |
| |||
0 commit comments