函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blk_mq_poll_hybrid_sleep

函数原型:static bool blk_mq_poll_hybrid_sleep(struct request_queue *q, struct blk_mq_hw_ctx *hctx, struct request *rq)

返回类型:bool

参数:

类型参数名称
struct request_queue *q
struct blk_mq_hw_ctx *hctx
struct request *rq
3384  如果rq_flags按位与already slept for hybrid poll 则返回:false
3393  如果poll_nsec大于0则nsecs等于poll_nsec
3395  否则nsecs等于blk_mq_poll_nsecs(q, hctx, rq)
3398  如果非nsecs则返回: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  循环
3414  如果lk_mq_rq_state() - read the current MQ_RQ_* state of a request*@rq: target request.恒等于MQ_RQ_COMPLETE退出
3416  set_current_state(深度睡眠态)
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  如果taskio_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 task且非signal_pending(当前进程)循环
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;* (就绪态)
3425  destroy_hrtimer_on_stack( & timer)
3426  返回:true
调用者
名称描述
blk_mq_poll_hybrid