函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-mq-sched.c Create Date:2022-07-27 18:50:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:blk_mq_sched_dispatch_requests

函数原型:void blk_mq_sched_dispatch_requests(struct blk_mq_hw_ctx *hctx)

返回类型:void

参数:

类型参数名称
struct blk_mq_hw_ctx *hctx
172  q等于@queue: Pointer to the request queue that owns this hardware context.
173  e等于elevator
174  has_sched_dispatch等于edispatch_request
175  LIST_HEAD(rq_list)
178  如果此条件成立可能性小(为编译器优化)(blk_mq_hctx_stopped(hctx) || blk_queue_quiesced(q))则返回
181  @run: Number of dispatched requests. 自加
187  如果非链表为空且不修改
188  加自旋锁
189  如果非链表为空加入二个链表项并重新初始化
191  自旋锁解锁
207  如果非链表为空
208  Mark a hardware queue as needing a restart. For shared queues, maintain* a count of how many hardware queues are marked for restart.
215  否则如果has_sched_dispatch
216  Only SCSI implements .get_budget and .put_budget, and SCSI restarts* its queue by itself in its completion handler, so we don't need to* restart queue if .get_budget() returns BLK_STS_NO_RESOURCE.
217  否则如果@dispatch_busy: Number used by blk_mq_update_dispatch_busy() to* decide if the hw_queue is busy using Exponential Weighted Moving* Average algorithm.
219  Only SCSI implements .get_budget and .put_budget, and SCSI restarts* its queue by itself in its completion handler, so we don't need to* restart queue if .get_budget() returns BLK_STS_NO_RESOURCE.
220  否则
221  Process software queues that have been marked busy, splicing them* to the for-dispatch
222  Returns true if we did some work AND can potentially do more.
调用者
名称描述
__blk_mq_run_hw_queue