函数逻辑报告 |
Source Code:block\blk-throttle.c |
Create Date:2022-07-27 19:20:07 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:blk_throtl_bio
函数原型:bool blk_throtl_bio(struct request_queue *q, struct blkcg_gq *blkg, struct bio *bio)
返回类型:bool
参数:
类型 | 参数 | 名称 |
---|---|---|
struct request_queue * | q | |
struct blkcg_gq * | blkg | |
struct bio * | bio |
2164 | struct throtl_qnode * qn = NULL |
2165 | tg等于blkg_to_tg(blkg ? : root_blkg) |
2168 | bool throttled = false |
2171 | WARN_ON_ONCE(!_read_lock_held() - might we be in RCU read-side critical section?* If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an RCU* read-side critical section) |
2174 | 如果bio_flagged(bio, BIO_THROTTLED)则转到:out |
2183 | 如果非 are there any throtl rules between this group and td? [rw]则转到:out |
2186 | spin_lock_irq( & queue_lock) |
2190 | blk_throtl_update_idletime(tg) |
2192 | sq等于 this group's service queue |
2194 | again : |
2195 | 当(true)循环 |
2196 | 如果last_low_overflow_time[rw]恒等于0则last_low_overflow_time[rw]等于jiffies |
2198 | throtl_downgrade_check(tg) |
2199 | throtl_upgrade_check(tg) |
2201 | 如果 number of queued bios [rw]则退出 |
2206 | last_low_overflow_time[rw]等于jiffies |
2207 | 如果throtl_can_upgrade(td, tg)则 |
2208 | throtl_upgrade_state(td) |
2209 | 转到:again |
2211 | 退出 |
2215 | throtl_charge_bio(tg, bio) |
2235 | qn等于qnode_on_parent[rw] |
2236 | sq等于 the parent service_queue |
2238 | 如果非tg则转到:out_unlock |
2243 | 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".(sq, "[%c] bio. bdisp=%llu sz=%u bps=%llu iodisp=%u iops=%u queued=%d/%d", rw == generic data direction definitions ? 'R' : 'W', Number of bytes disptached in current slice [rw], residual I/O count , tg_bps_limit(tg, rw), Number of bio's dispatched in current slice [rw], tg_iops_limit(tg, rw), number of queued bios [generic data direction definitions ], number of queued bios [WRITE]) |
2250 | last_low_overflow_time[rw]等于jiffies |
2254 | throttled = true |
2262 | 如果flags按位与 bio_lists[] became non-empty 则 |
2263 | tg_update_disptime(tg) |
2267 | out_unlock : |
2268 | spin_unlock_irq( & queue_lock) |
2269 | out : |
2270 | bio_set_flag(bio, BIO_THROTTLED) |
2276 | 返回:throttled |
名称 | 描述 |
---|---|
blkcg_bio_issue_check |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |