Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Mark us waiting for a tag. For shared tags, this involves hooking us into* the tag wakeups. For non-shared tags, we can simply mark us needing a* restart. For both cases, take care to check the condition again after* marking us as waiting.

Proto:static bool blk_mq_mark_tag_wait(struct blk_mq_hw_ctx *hctx, struct request *rq)

Type:bool

Parameter:

TypeParameterName
struct blk_mq_hw_ctx *hctx
struct request *rq
1081  sbq = bitmap_tags
1086  If Not (@flags: BLK_MQ_F_* flags. Defines the behaviour of the queue. & BLK_MQ_F_TAG_SHARED) Then
1087  blk_mq_sched_mark_restart_hctx(hctx)
1097  Return blk_mq_get_driver_tag(rq)
1100  wait = @dispatch_wait: Waitqueue to put requests when there is no tag* available at the moment, to wait for another try in the future.
1101  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 Return false
1104  wq = wait
1106  spin_lock_irq( & lock)
1107  spin_lock( & @dispatch_wait_lock: Lock for dispatch_wait queue. )
1108  If Not list_empty - tests whether a list is empty*@head: the list to test. Then
1109  spin_unlock( & @dispatch_wait_lock: Lock for dispatch_wait queue. )
1110  spin_unlock_irq( & lock)
1111  Return false
1114  atomic_inc( & @ws_active: count of currently active ws waitqueues)
1115  flags &= ~wait_queue_entry::flags
1116  __add_wait_queue(wq, wait)
1123  ret = blk_mq_get_driver_tag(rq)
1124  If Not ret Then
1125  spin_unlock( & @dispatch_wait_lock: Lock for dispatch_wait queue. )
1126  spin_unlock_irq( & lock)
1127  Return false
1134  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
1135  atomic_dec( & @ws_active: count of currently active ws waitqueues)
1136  spin_unlock( & @dispatch_wait_lock: Lock for dispatch_wait queue. )
1137  spin_unlock_irq( & lock)
1139  Return true
Caller
NameDescribe
blk_mq_dispatch_rq_listReturns true if we did some work AND can potentially do more.