Function report |
Source Code:block\blk-iocost.c |
Create Date:2022-07-28 17:48:03 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:iocg_kick_delay
Proto:static bool iocg_kick_delay(struct ioc_gq *iocg, struct ioc_now *now, u64 cost)
Type:bool
Parameter:
Type | Parameter | Name |
---|---|---|
struct ioc_gq * | iocg | |
struct ioc_now * | now | |
u64 | cost |
1218 | blkg = iocg_to_blkg(iocg) |
1221 | margin_ns = margin_us * NSEC_PER_USEC |
1226 | current_hweight(iocg, NULL, & hw_inuse) |
1227 | vtime += Scale @abs_cost to the inverse of @hw_inuse. The lower the hierarchical* weight, the more expensive each IO. Must round up. |
1230 | If time_before_eq64(vtime, vnow) Then |
1231 | blkcg_clear_delay(blkg) |
1232 | Return false |
1234 | If Not atomic_read( & use_delay) && time_before_eq64(vtime, vnow + vmargin) Then Return false |
1239 | If cost Then |
1240 | cost_ns = DIV64_U64_ROUND_UP(cost * NSEC_PER_USEC, vrate) |
1244 | blkcg_use_delay(blkg) |
1246 | expires = now_ns + DIV64_U64_ROUND_UP(vtime - vnow, vrate) * NSEC_PER_USEC |
1257 | Return true |
Name | Describe |
---|---|
iocg_delay_timer_fn | |
ioc_timer_fn | |
ioc_rqos_throttle |
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 |