Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:blk_mq_sched_dispatch_requests

Proto:void blk_mq_sched_dispatch_requests(struct blk_mq_hw_ctx *hctx)

Type:void

Parameter:

TypeParameterName
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 = e && dispatch_request
175  LIST_HEAD(rq_list)
178  If Value for the false possibility is greater at compile time(blk_mq_hctx_stopped(hctx) || blk_queue_quiesced(q)) Then Return
181  @run: Number of dispatched requests. ++
187  If Not list_empty_careful - tests whether a list is empty and not being modified*@head: the list to test* Description:* tests whether a list is empty _and_ checks that no other CPU might be* in the process of modifying either member (next or prev)* NOTE: using Then
188  spin_lock( & @lock: Protects the dispatch list. )
189  If Not list_empty - tests whether a list is empty*@head: the list to test. Then list_splice_init - join two lists and reinitialise the emptied list.*@list: the new list to add.*@head: the place to add it in the first list.* The list at @list is reinitialised
191  spin_unlock( & @lock: Protects the dispatch list. )
207  If Not list_empty - tests whether a list is empty*@head: the list to test. Then
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  Else if has_sched_dispatch Then
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  Else if @dispatch_busy: Number used by blk_mq_update_dispatch_busy() to* decide if the hw_queue is busy using Exponential Weighted Moving* Average algorithm. Then
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  Else
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.
Caller
NameDescribe
__blk_mq_run_hw_queue