| Function report | 
| Source Code: block\blk-iolatency.c | Create Date:2022-07-28 17:45:14 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:We scale the qd down faster than we scale up, so we need to use this helper* to adjust the scale_cookie accordingly so we don't prematurely get* scale_cookie at DEFAULT_SCALE_COOKIE and unthrottle too much
Proto:static void scale_cookie_change(struct blk_iolatency *blkiolat, struct child_latency_info *lat_info, bool up)
Type:void
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct blk_iolatency * | blkiolat | |
| struct child_latency_info * | lat_info | |
| bool | up | 
| 327 | qd = Max # of requests | 
| 328 | scale = scale_amount(qd, up) | 
| 331 | diff = 0 | 
| 333 | If old < DEFAULT_SCALE_COOKIE Then diff = DEFAULT_SCALE_COOKIE - old | 
| 336 | If up Then | 
| 337 | If scale + old > DEFAULT_SCALE_COOKIE Then atomic_set( & Cookie to tell if we need to scale up or down. , DEFAULT_SCALE_COOKIE) | 
| 340 | Else if diff > qd Then atomic_inc( & Cookie to tell if we need to scale up or down. ) | 
| 342 | Else atomic_add(scale, & Cookie to tell if we need to scale up or down. ) | 
| 344 | Else | 
| 352 | If diff < max_scale Then atomic_dec( & Cookie to tell if we need to scale up or down. ) | 
| 354 | Else | 
| Name | Describe | 
|---|---|
| iolatency_check_latencies | |
| blkiolatency_timer_fn | 
| 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 |