Function report |
Source Code:block\blk-mq.c |
Create Date:2022-07-28 17:12:11 |
Last Modify:2020-03-17 23:18:05 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__blk_mq_update_nr_hw_queues
Proto:static void __blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int nr_hw_queues)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct blk_mq_tag_set * | set | |
int | nr_hw_queues |
3243 | lockdep_assert_held( & tag_list_lock) |
3245 | If nr_maps == 1 && nr_hw_queues > Setup number of possible processor ids Then nr_hw_queues = Setup number of possible processor ids |
3247 | If nr_hw_queues < 1 || nr_hw_queues == nr_hw_queues Then Return |
3251 | blk_mq_freeze_queue(q) |
3258 | If Not Cache the elevator_type in qe pair list and switch the* io scheduler to 'none' Then Go to switch_back |
3263 | blk_mq_sysfs_unregister(q) |
3266 | If blk_mq_realloc_tag_set_tags(set, nr_hw_queues, nr_hw_queues) < 0 Then Go to reregister |
3270 | prev_nr_hw_queues = nr_hw_queues |
3271 | nr_hw_queues = nr_hw_queues |
3272 | blk_mq_update_queue_map(set) |
3273 | fallback : |
3275 | blk_mq_realloc_hw_ctxs(set, q) |
3276 | If nr_hw_queues != nr_hw_queues Then |
3277 | pr_warn("Increasing nr_hw_queues to %d fails, fallback to %d\n", nr_hw_queues, prev_nr_hw_queues) |
3279 | nr_hw_queues = prev_nr_hw_queues |
3280 | blk_mq_map_queues( & map[HCTX_TYPE_DEFAULT]) |
3281 | Go to fallback |
3283 | blk_mq_map_swqueue(q) |
3286 | reregister : |
3288 | blk_mq_sysfs_register(q) |
3292 | switch_back : |
3294 | blk_mq_elv_switch_back( & head, q) |
3297 | blk_mq_unfreeze_queue(q) |
Name | Describe |
---|---|
blk_mq_update_nr_hw_queues |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |