函数逻辑报告 |
Source Code:block\blk-throttle.c |
Create Date:2022-07-27 19:18:10 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Trim the used slices and adjust slice start accordingly
函数原型:static inline void throtl_trim_slice(struct throtl_grp *tg, bool rw)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct throtl_grp * | tg | |
bool | rw |
842 | BUG_ON(time_before(slice_end[rw], When did we start a new slice [rw])) |
860 | throtl_set_slice_end(tg, rw, jiffies + throtl_slice) |
866 | 如果非nr_slices则返回 |
868 | tmp等于tg_bps_limit(tg, rw)乘throtl_slice乘nr_slices |
870 | bytes_trim等于tmp |
872 | io_trim等于tg_iops_limit(tg, rw)乘throtl_slice乘nr_slices除HZ |
875 | 如果非bytes_trim且非io_trim则返回 |
878 | 如果 Number of bytes disptached in current slice [rw]大于等于bytes_trim则 Number of bytes disptached in current slice [rw]减等于bytes_trim |
880 | 否则 Number of bytes disptached in current slice [rw]等于0 |
883 | 如果 Number of bio's dispatched in current slice [rw]大于等于io_trim则 Number of bio's dispatched in current slice [rw]减等于io_trim |
885 | 否则 Number of bio's dispatched in current slice [rw]等于0 |
890 | hrotl_log - log debug message via blktrace*@sq: the service_queue being reported*@fmt: printf format string*@args: printf args* The messages are prefixed with "throtl BLKG_NAME" if @sq belongs to a* throtl_grp; otherwise, just "throtl".( & this group's service queue , "[%c] trim slice nr=%lu bytes=%llu io=%lu start=%lu end=%lu jiffies=%lu", rw == generic data direction definitions ? 'R' : 'W', nr_slices, bytes_trim, io_trim, When did we start a new slice [rw], slice_end[rw], jiffies) |
名称 | 描述 |
---|---|
tg_dispatch_one_bio | |
blk_throtl_bio |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |