Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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 activityDownload SCCTChinese

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:

TypeParameterName
struct blk_mq_tag_set *set
intnr_hw_queues
3240  LIST_HEAD(head)
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
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  If Not Cache the elevator_type in qe pair list and switch the* io scheduler to 'none' Then Go to switch_back
3262  blk_mq_debugfs_unregister_hctxs(q)
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)
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)
Caller
NameDescribe
blk_mq_update_nr_hw_queues