Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-mq.c Create Date:2022-07-28 17:11:14
Last Modify:2020-03-17 23:18:05 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:blk_mq_map_swqueue

Proto:static void blk_mq_map_swqueue(struct request_queue *q)

Type:void

Parameter:

TypeParameterName
struct request_queue *q
2437  set = tag_set
2440  pumask_clear - clear all cpus (< nr_cpu_ids) in a cpumask*@dstp: the cpumask pointer
2441  @nr_ctx: Number of software queues. = 0
2442  @dispatch_from: Software queue to be used when no scheduler was* selected. = NULL
2450  for_each_possible_cpu(i)
2451  hctx_idx = mq_map[i]
2453  If Not tags[hctx_idx] && Not __blk_mq_alloc_rq_map(set, hctx_idx) Then
2461  mq_map[i] = 0
2464  ctx = per_cpu_ptr( sw queues , i)
2465  When j < nr_maps cycle
2466  If Not nr_queues Then
2473  hctxs[j] = hctx
2494  When j < HCTX_MAX_TYPES cycle 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  If i && tags[i] Then blk_mq_free_map_and_requests(set, i)
2513  Continue
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
Caller
NameDescribe
blk_mq_init_allocated_queue
__blk_mq_update_nr_hw_queues