| Function report | 
| Source Code: block\blk-iocost.c | Create Date:2022-07-28 17:48:10 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:ioc_lat_stat
Proto:static void ioc_lat_stat(struct ioc *ioc, unsigned int *missed_ppm_ar, unsigned int *rq_wait_pct_p)
Type:void
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct ioc * | ioc | |
| unsigned int * | missed_ppm_ar | |
| unsigned int * | rq_wait_pct_p | 
| 1273 | unsigned int nr_met[2] = {} | 
| 1274 | unsigned int nr_missed[2] = {} | 
| 1275 | rq_wait_ns = 0 | 
| 1278 | for_each_online_cpu(cpu) | 
| 1279 | stat = per_cpu_ptr(pcpu_stat, cpu) | 
| 1284 | this_missed = READ_ONCE(nr_missed) | 
| 1287 | nr_missed[rw] += this_missed - last_missed | 
| 1289 | last_missed = this_missed | 
| 1292 | this_rq_wait_ns = READ_ONCE(rq_wait_ns) | 
| 1293 | rq_wait_ns += this_rq_wait_ns - last_rq_wait_ns | 
| 1294 | last_rq_wait_ns = this_rq_wait_ns | 
| 1298 | If nr_met[rw] + nr_missed[rw] Then missed_ppm_ar[rw] = DIV64_U64_ROUND_UP((u64)nr_missed[rw] * MILLION, nr_met[rw] + nr_missed[rw]) | 
| 1302 | Else missed_ppm_ar[rw] = 0 | 
| Name | Describe | 
|---|---|
| ioc_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 |