函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:It'd be great if the workqueue API had a way to pass* in a mask and had some smarts for more clever placement.* For now we just round-robin here, switching for every* BLK_MQ_CPU_WORK_BATCH queued items.

函数原型:static int blk_mq_hctx_next_cpu(struct blk_mq_hw_ctx *hctx)

返回类型:int

参数:

类型参数名称
struct blk_mq_hw_ctx *hctx
1389  bool tried = false
1390  next_cpu等于@next_cpu: Used by blk_mq_hctx_next_cpu() for round-robin CPU* selection from @cpumask.
1392  如果nr_hw_queues恒等于1则返回:WORK_CPU_UNBOUND
1395  如果@next_cpu_batch: Counter of how many works left in the batch before* changing to the next CPU.先自减小于等于0则
1396  select_cpu :
1397  next_cpu等于cpumask_next_and(next_cpu, @cpumask: Map of available CPUs where this hctx can run. , cpu_online_mask)
1399  如果next_cpu大于等于CPU数量next_cpu等于blk_mq_first_mapped_cpu(hctx)
1401  @next_cpu_batch: Counter of how many works left in the batch before* changing to the next CPU.等于BLK_MQ_CPU_WORK_BATCH
1408  如果非cpu_online(next_cpu)则
1409  如果非tried
1410  tried = true
1411  转到:select_cpu
1418  @next_cpu: Used by blk_mq_hctx_next_cpu() for round-robin CPU* selection from @cpumask.等于next_cpu
1419  @next_cpu_batch: Counter of how many works left in the batch before* changing to the next CPU.等于1
1420  返回:WORK_CPU_UNBOUND
1423  @next_cpu: Used by blk_mq_hctx_next_cpu() for round-robin CPU* selection from @cpumask.等于next_cpu
1424  返回:next_cpu
调用者
名称描述
__blk_mq_delay_run_hw_queue