函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:iocg_kick_waitq

函数原型:static void iocg_kick_waitq(struct ioc_gq *iocg, struct ioc_now *now)

返回类型:void

参数:

类型参数名称
struct ioc_gq *iocg
struct ioc_now *now
1144  ioc等于ioc
1145  struct iocg_wake_ctx ctx = {iocg = iocg}
1146  margin_ns等于period_usWAITQ_TIMER_MARGIN_PCT除100乘NSEC_PER_USEC
1152  lockdep_assert_held( & lock)
1154  current_hweight(iocg, NULL, & hw_inuse)
1155  vbudget等于vnowatomic64_read( & * `vtime` is this iocg's vtime cursor which progresses as IOs are * issued. If lagging behind device vtime, the delta represents * the currently available IO budget. If runnning ahead, the * overage. * `vtime_done` is the same but progressed on completion )
1158  abs_vdebt等于atomic64_read( & abs_vdebt)
1159  vdebt等于Scale @abs_cost to the inverse of @hw_inuse. The lower the hierarchical* weight, the more expensive each IO. Must round up.
1160  如果vdebtvbudget大于0则
1161  delta等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, vbudget, vdebt)
1162  abs_delta等于两数取小(The inverse of abs_cost_to_cost(). Must round up., abs_vdebt)
1165  atomic64_add(delta, & * `vtime` is this iocg's vtime cursor which progresses as IOs are * issued. If lagging behind device vtime, the delta represents * the currently available IO budget. If runnning ahead, the * overage. * `vtime_done` is the same but progressed on completion )
1166  atomic64_add(delta, & done_vtime)
1167  atomic64_sub(abs_delta, & abs_vdebt)
1168  如果WARN_ON_ONCE(atomic64_read( & abs_vdebt) < 0)则atomic64_set( & abs_vdebt, 0)
1176  hw_inuse等于hw_inuse
1177  vbudget等于vbudgetvdebt
1178  __wake_up_locked_key( & waitq, Convenience macros for the sake of wake_up(): , & ctx)
1179  如果非waitqueue_active -- locklessly test for waiters on the queue*@wq_head: the waitqueue to test for waiters* returns true if the wait list is not empty* NOTE: this function is lockless and requires care, incorrect usage _will_则返回
1181  如果WARN_ON_ONCE(vbudget >= 0)则返回
1185  vshortage等于负vbudget
1186  expires等于now_nsDIV64_U64_ROUND_UP(vshortage, vrate)乘NSEC_PER_USEC
1188  expires加等于margin_ns除4
1191  oexpires等于Convert ktime_t to nanoseconds
1192  如果hrtimer_is_queued = check, whether the timer is on one of the queues*@timer: Timer to check* Returns: True if the timer is queued, false otherwise* The function can be used lockless, but it gives only a current snapshot.abs - return absolute value of an argument*@x: the value. If it is unsigned type, it is converted to signed type first.* char is treated as if it was signed (regardless of whether it really is)* but the macro's return type is preserved as char.(oexpires - expires)小于等于margin_ns除4则返回
1196  hrtimer_start_range_ns - (re)start an hrtimer*@timer: the timer to be added*@tim: expiry time*@delta_ns: "slack" range for the timer*@mode: timer mode: absolute (HRTIMER_MODE_ABS) or* relative (HRTIMER_MODE_REL), and pinned (HRTIMER_MODE_PINNED);* softirq
调用者
名称描述
iocg_waitq_timer_fn
ioc_timer_fn
ioc_rqos_throttle