函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:q_qos_wait - throttle on a rqw if we need to*@rqw: rqw to throttle on*@private_data: caller provided specific data*@acquire_inflight_cb: inc the rqw->inflight counter if we can*@cleanup_cb: the callback to cleanup in case we race with a waker

函数原型:void rq_qos_wait(struct rq_wait *rqw, void *private_data, acquire_inflight_cb_t *acquire_inflight_cb, cleanup_cb_t *cleanup_cb)

返回类型:void

参数:

类型参数名称
struct rq_wait *rqw
void *private_data
acquire_inflight_cb_t *acquire_inflight_cb
cleanup_cb_t *cleanup_cb
253  struct rq_qos_wait_data data = {wq = {func = rq_qos_wake_function, entry = Simple doubly linked list implementation(entry), }, task = 当前进程, rqw = rqw, cb = acquire_inflight_cb, private_data = private_data, }
265  has_sleeper等于wq_has_sleeper - check if there are any waiting processes*@wq_head: wait queue head* Returns true if wq_head has waiting processes* Please refer to the comment for waitqueue_active.
266  如果非has_sleeperacquire_inflight_cb(rqw, private_data)则返回
269  prepare_to_wait_exclusive( & wait, & wq, 深度睡眠态)
270  has_sleeper等于非wq_has_single_sleeper - check if there is only one sleeper*@wq_head: wait queue head* Returns true of wq_head has only one sleeper on the list.* Please refer to the comment for waitqueue_active.
271  循环
273  如果got_token退出
283  smp_rmb()
286  退出
288  io_schedule()
289  has_sleeper = true
290  set_current_state(深度睡眠态)
291  当1循环
292  sh_wait - clean up after waiting in a queue*@wq_head: waitqueue waited on*@wq_entry: wait descriptor* Sets current thread back to running state and removes* the wait descriptor from the given waitqueue if still* queued.
调用者
名称描述
__blkcg_iolatency_throttle
__wbt_waitBlock if we will exceed our limit, or if we are currently waiting for* the timer to kick off queuing again.