Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:blk_mq_poll_hybrid_sleep

Proto:static bool blk_mq_poll_hybrid_sleep(struct request_queue *q, struct blk_mq_hw_ctx *hctx, struct request *rq)

Type:bool

Parameter:

TypeParameterName
struct request_queue *q
struct blk_mq_hw_ctx *hctx
struct request *rq
3384  If rq_flags & already slept for hybrid poll Then Return false
3393  If poll_nsec > 0 Then nsecs = poll_nsec
3395  Else nsecs = blk_mq_poll_nsecs(q, hctx, rq)
3398  If Not nsecs Then Return false
3401  rq_flags |= already slept for hybrid poll
3407  kt = nsecs
3409  mode = Time value is relative to now
3410  hrtimer_init_sleeper_on_stack( & hs, CLOCK_MONOTONIC, mode)
3411  hrtimer_set_expires( & timer, kt)
3413  Do
3414  If lk_mq_rq_state() - read the current MQ_RQ_* state of a request*@rq: target request. == MQ_RQ_COMPLETE Then Break
3416  set_current_state(TASK_UNINTERRUPTIBLE)
3417  hrtimer_sleeper_start_expires - Start a hrtimer sleeper timer*@sl: sleeper to be started*@mode: timer mode abs/rel* Wrapper around hrtimer_start_expires() for hrtimer_sleeper based timers* to allow PREEMPT_RT to tweak the delivery mode (soft/hardirq
3418  If task Then io_schedule()
3420  hrtimer_cancel - cancel a timer and wait for the handler to finish.*@timer: the timer to be cancelled* Returns:* 0 when the timer was not active* 1 when the timer was active
3421  mode = Time value is absolute
3422  When task && Not signal_pending(current process) cycle
3424  set_current_state() includes a barrier so that the write of current->state* is correctly serialised wrt the caller's subsequent test of whether to* actually sleep:* for (;;) {* set_current_state(TASK_UNINTERRUPTIBLE);* if (!need_sleep)* break;* (Used in tsk->state: )
3425  destroy_hrtimer_on_stack( & timer)
3426  Return true
Caller
NameDescribe
blk_mq_poll_hybrid