函数逻辑报告 |
Source Code:block\blk-cgroup.c |
Create Date:2022-07-27 19:16:26 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Scale the accumulated delay based on how long it has been since we updated* the delay. We only call this when we are adding delay, in case it's been a* while since we added delay, and when we are checking to see if we need to
函数原型:static void blkcg_scale_delay(struct blkcg_gq *blkg, u64 now)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct blkcg_gq * | blkg | |
u64 | now |
1515 | old等于atomic64_read( & delay_start) |
1530 | 如果time_before64(old + NSEC_PER_SEC, now)且atomic64_cmpxchg( & delay_start, old, now)恒等于old则 |
1532 | cur等于atomic64_read( & delay_nsec) |
1533 | sub等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, last_delay, now - old) |
1534 | cur_use等于atomic_read( & use_delay) |
1540 | 如果cur_use小于last_use则sub等于max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, sub, last_delay >> 1) |
1549 | 如果此条件成立可能性小(为编译器优化)(cur < sub)则 |
1550 | atomic64_set( & delay_nsec, 0) |
1551 | last_delay等于0 |
1552 | 否则 |
1553 | atomic64_sub(sub, & delay_nsec) |
1554 | last_delay等于cur减sub |
名称 | 描述 |
---|---|
blkcg_maybe_throttle_blkg | This is called when we want to actually walk up the hierarchy and check to* see if we need to throttle, and then actually throttle if there is some* accumulated delay. This should only be called upon return to user space so |
blkcg_add_delay | lkcg_add_delay - add delay to this blkg*@blkg: blkg of interest*@now: the current time in nanoseconds*@delta: how many nanoseconds of delay to add* Charge @delta to the blkg's current delay accumulation. This is used to |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |