Function report |
Source Code:block\blk-throttle.c |
Create Date:2022-07-28 17:42:42 |
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_bps_limit
Proto:static bool tg_with_in_bps_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 |
944 | bio_size = throtl_bio_data_size(bio) |
949 | If Not jiffy_elapsed Then jiffy_elapsed_rnd = throtl_slice |
954 | tmp = tg_bps_limit(tg, rw) * jiffy_elapsed_rnd |
956 | bytes_allowed = tmp |
958 | If Number of bytes disptached in current slice [rw] + bio_size <= bytes_allowed Then |
968 | If Not jiffy_wait Then jiffy_wait = 1 |
975 | jiffy_wait = jiffy_wait + jiffy_elapsed_rnd - jiffy_elapsed |
976 | If wait Then wait = jiffy_wait |
978 | 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 |