函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blk_mq_map_swqueue

函数原型:static void blk_mq_map_swqueue(struct request_queue *q)

返回类型:void

参数:

类型参数名称
struct request_queue *q
2437  set等于tag_set
2440  清空全部CPU信息
2441  @nr_ctx: Number of software queues. 等于0
2442  @dispatch_from: Software queue to be used when no scheduler was* selected. = NULL
2450  遍历可用CPU(i)
2451  hctx_idx等于mq_map[i]
2453  如果非tags[hctx_idx]且非__blk_mq_alloc_rq_map(set, hctx_idx)则
2461  mq_map[i]等于0
2464  ctx等于per_cpu_ptr( sw queues , i)
2465 j小于nr_maps循环
2466  如果非nr_queues
2473  hctxs[j]等于hctx
2479  如果测试CPU信息则继续下一循环
2494 j小于HCTX_MAX_TYPES循环hctxs[j]等于lk_mq_map_queue_type() - map (hctx_type,cpu) to hardware queue*@q: request queue*@type: the hctx type index*@cpu: CPU
2509  如果itags[i]则blk_mq_free_map_and_requests(set, i)
2513  继续下一循环
2516  @tags: Tags owned by the block driver. A tag at this set is only* assigned when a request is dispatched from a hardware queue.等于tags[i]
2517  WARN_ON(!@tags: Tags owned by the block driver. A tag at this set is only* assigned when a request is dispatched from a hardware queue.)
2524  sbitmap_resize( & @ctx_map: Bitmap for each software queue. If bit is on, there is a* pending request in that software queue., @nr_ctx: Number of software queues. )
2529  @next_cpu: Used by blk_mq_hctx_next_cpu() for round-robin CPU* selection from @cpumask.等于blk_mq_first_mapped_cpu(hctx)
2530  @next_cpu_batch: Counter of how many works left in the batch before* changing to the next CPU.等于BLK_MQ_CPU_WORK_BATCH
调用者
名称描述
blk_mq_init_allocated_queue
__blk_mq_update_nr_hw_queues