函数逻辑报告 |
Source Code:block\blk-iocost.c |
Create Date:2022-07-27 19:23:49 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:iocg_kick_delay
函数原型:static bool iocg_kick_delay(struct ioc_gq *iocg, struct ioc_now *now, u64 cost)
返回类型:bool
参数:
类型 | 参数 | 名称 |
---|---|---|
struct ioc_gq * | iocg | |
struct ioc_now * | now | |
u64 | cost |
1218 | blkg等于iocg_to_blkg(iocg) |
1221 | margin_ns等于margin_us乘NSEC_PER_USEC |
1226 | current_hweight(iocg, NULL, & hw_inuse) |
1227 | vtime加等于Scale @abs_cost to the inverse of @hw_inuse. The lower the hierarchical* weight, the more expensive each IO. Must round up. |
1230 | 如果time_before_eq64(vtime, vnow)则 |
1231 | blkcg_clear_delay(blkg) |
1232 | 返回:false |
1234 | 如果非atomic_read( & use_delay)且time_before_eq64(vtime, vnow + vmargin)则返回:false |
1239 | 如果cost则 |
1240 | cost_ns等于DIV64_U64_ROUND_UP(cost * NSEC_PER_USEC, vrate) |
1244 | blkcg_use_delay(blkg) |
1246 | expires等于now_ns加DIV64_U64_ROUND_UP(vtime - vnow, vrate)乘NSEC_PER_USEC |
1257 | 返回:true |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |