函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-mq.c Create Date:2022-07-27 18:47:31
Last Modify:2020-03-17 23:18:05 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__blk_mq_update_nr_hw_queues

函数原型:static void __blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int nr_hw_queues)

返回类型:void

参数:

类型参数名称
struct blk_mq_tag_set *set
intnr_hw_queues
3240  LIST_HEAD(head)
3243  lockdep_assert_held( & tag_list_lock)
3245  如果nr_maps恒等于1且nr_hw_queues大于CPU数量nr_hw_queues等于CPU数量
3247  如果nr_hw_queues小于1或nr_hw_queues恒等于nr_hw_queues则返回
3250  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(q, & tag_list, tag_set_list)
3251  blk_mq_freeze_queue(q)
3257  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(q, & tag_list, tag_set_list)
3258  如果非Cache the elevator_type in qe pair list and switch the* io scheduler to 'none'则转到:switch_back
3262  blk_mq_debugfs_unregister_hctxs(q)
3263  blk_mq_sysfs_unregister(q)
3266  如果blk_mq_realloc_tag_set_tags(set, nr_hw_queues, nr_hw_queues)小于0则转到: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  如果nr_hw_queues不等于nr_hw_queues
3277  打印警告信息("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  转到:fallback
3283  blk_mq_map_swqueue(q)
3286  reregister :
3288  blk_mq_sysfs_register(q)
3289  blk_mq_debugfs_register_hctxs(q)
3292  switch_back :
3293  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(q, & tag_list, tag_set_list)
3294  blk_mq_elv_switch_back( & head, q)
3296  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(q, & tag_list, tag_set_list)
3297  blk_mq_unfreeze_queue(q)
调用者
名称描述
blk_mq_update_nr_hw_queues