Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:void rq_qos_wait(struct rq_wait *rqw, void *private_data, acquire_inflight_cb_t *acquire_inflight_cb, cleanup_cb_t *cleanup_cb)

Type:void

Parameter:

TypeParameterName
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 = current process, 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  If Not has_sleeper && acquire_inflight_cb(rqw, private_data) Then Return
269  prepare_to_wait_exclusive( & wait, & wq, TASK_UNINTERRUPTIBLE)
270  has_sleeper = Not 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  Do
273  If got_token Then Break
283  smp_rmb()
286  Break
288  io_schedule()
289  has_sleeper = true
290  set_current_state(TASK_UNINTERRUPTIBLE)
291  When 1 cycle
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.
Caller
NameDescribe
__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.