diff options
| author | Jianchao Wang <[email protected]> | 2018-10-12 18:07:28 +0800 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2018-10-13 15:42:04 -0600 |
| commit | e01ad46d53b59720c6ae69963ee1756506954c85 (patch) | |
| tree | d84fbc92eacf1b2341032ae25dd93a3dc3dd1a3d /tools/perf/util/c++/clang.cpp | |
| parent | 34d11ffac1f56c3895dad32153abd6814452dc77 (diff) | |
blk-mq: fallback to previous nr_hw_queues when updating fails
When we try to increate the nr_hw_queues, we may fail due to
shortage of memory or other reason, then blk_mq_realloc_hw_ctxs stops
and some entries in q->queue_hw_ctx are left with NULL. However,
because queue map has been updated with new nr_hw_queues, some cpus
have been mapped to hw queue which just encounters allocation failure,
thus blk_mq_map_queue could return NULL. This will cause panic in
following blk_mq_map_swqueue.
To fix it, when increase nr_hw_queues fails, fallback to previous
nr_hw_queues and post warning. At the same time, driver's .map_queues
usually use completion irq affinity to map hw and cpu, fallback
nr_hw_queues will cause lack of some cpu's map to hw, so use default
blk_mq_map_queues to do that.
Reported-by: [email protected]
Signed-off-by: Jianchao Wang <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/util/c++/clang.cpp')
0 files changed, 0 insertions, 0 deletions