Function report | 
Source Code:block\blk-throttle.c | 
Create Date:2022-07-28 17:42:38 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:tg_with_in_iops_limit
Proto:static bool tg_with_in_iops_limit(struct throtl_grp *tg, struct bio *bio, unsigned long *wait)
Type:bool
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct throtl_grp * | tg | |
| struct bio * | bio | |
| unsigned long * | wait | 
| 904 | jiffy_elapsed = jiffies - When did we start a new slice [rw] | 
| 916 | tmp = tg_iops_limit(tg, rw) * jiffy_elapsed_rnd | 
| 919 | If tmp > UINT_MAX Then io_allowed = UINT_MAX | 
| 921 | Else io_allowed = tmp | 
| 924 | If Number of bio's dispatched in current slice [rw] + 1 <= io_allowed Then | 
| 931 | jiffy_wait = jiffy_elapsed_rnd - jiffy_elapsed | 
| 933 | If wait Then wait = jiffy_wait | 
| 935 | Return false | 
| Name | Describe | 
|---|---|
| tg_may_dispatch | Returns whether one can dispatch a bio or not. Also returns approx number* of jiffies to wait before this bio is with-in IO rate and can be dispatched | 
| 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  |