函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:iocg_activate

函数原型:static bool iocg_activate(struct ioc_gq *iocg, struct ioc_now *now)

返回类型:bool

参数:

类型参数名称
struct ioc_gq *iocg
struct ioc_now *now
1029  ioc等于ioc
1038  如果非链表为空
1039  ake a snapshot of the current [v]time and vrate
1040  cur_period等于atomic64_read( & c'd each period )
1041  如果atomic64_read( & * The period this iocg was last active in. Used for deactivation * and invalidating `vtime`.)不等于cur_periodatomic64_set( & * The period this iocg was last active in. Used for deactivation * and invalidating `vtime`., cur_period)
1043  返回:true
1047  如果 see __propagate_active_weight() and current_hweight() for details 则返回:false
1050  spin_lock_irq( & lock)
1052  ake a snapshot of the current [v]time and vrate
1055  cur_period等于atomic64_read( & c'd each period )
1056  last_period等于atomic64_read( & * The period this iocg was last active in. Used for deactivation * and invalidating `vtime`.)
1057  atomic64_set( & * The period this iocg was last active in. Used for deactivation * and invalidating `vtime`., cur_period)
1060  如果非链表为空则转到:succeed_unlock
1062 i大于0循环如果非链表为空
1064  转到:fail_unlock
1066  如果 see __propagate_active_weight() and current_hweight() for details 则转到:fail_unlock
1075  max_period_delta等于DIV64_U64_ROUND_UP(VTIME_VALID_DUR, period_us)
1076  vtime等于atomic64_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 )
1077  vmargin等于margin_usvrate
1078  vmin等于vnowvmargin
1080  如果last_periodmax_period_delta小于cur_periodtime_before64(vtime, vmin)则
1082  atomic64_add(vmin - vtime, & * `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 )
1083  atomic64_add(vmin - vtime, & done_vtime)
1084  vtime等于vmin
1092  hweight_gen等于atomic_read( & r lazy hweights )减1
1093  添加链表项
1094  propagate_active_weight(iocg, weight, last_inuse ? : weight)
1097  TRACE_IOCG_PATH(iocg_activate, iocg, now, last_period, cur_period, vtime)
1100  last_vtime等于vtime
1102  如果running恒等于IOC_IDLE
1103  running等于IOC_RUNNING
1104  ioc_start_period(ioc, now)
1107  succeed_unlock :
1108  spin_unlock_irq( & lock)
1109  返回:true
1111  fail_unlock :
1112  spin_unlock_irq( & lock)
1113  返回:false
调用者
名称描述
ioc_rqos_throttle