Function report | 
Source Code:block\blk-throttle.c | 
Create Date:2022-07-28 17:44:27 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:blk_throtl_bio
Proto:bool blk_throtl_bio(struct request_queue *q, struct blkcg_gq *blkg, struct bio *bio)
Type:bool
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| 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 | If bio_flagged(bio, BIO_THROTTLED) Then Go to out | 
| 2183 | If Not are there any throtl rules between this group and td? [rw] Then Go to out | 
| 2186 | spin_lock_irq( & queue_lock) | 
| 2190 | blk_throtl_update_idletime(tg) | 
| 2192 | sq = this group's service queue | 
| 2194 | again : | 
| 2195 | When (true) cycle | 
| 2196 | If last_low_overflow_time[rw] == 0 Then last_low_overflow_time[rw] = jiffies | 
| 2198 | throtl_downgrade_check(tg) | 
| 2199 | throtl_upgrade_check(tg) | 
| 2201 | If number of queued bios [rw] Then Break | 
| 2206 | last_low_overflow_time[rw] = jiffies | 
| 2207 | If throtl_can_upgrade(td, tg) Then | 
| 2208 | throtl_upgrade_state(td) | 
| 2209 | Go to again | 
| 2211 | Break | 
| 2215 | throtl_charge_bio(tg, bio) | 
| 2235 | qn = qnode_on_parent[rw] | 
| 2236 | sq = the parent service_queue | 
| 2238 | If Not tg Then Go to 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 | If flags & bio_lists[] became non-empty Then | 
| 2263 | tg_update_disptime(tg) | 
| 2267 | out_unlock : | 
| 2268 | spin_unlock_irq( & queue_lock) | 
| 2269 | out : | 
| 2270 | bio_set_flag(bio, BIO_THROTTLED) | 
| 2276 | Return throttled | 
| Name | Describe | 
|---|---|
| blkcg_bio_issue_check | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |