函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-iocost.c Create Date:2022-07-27 19:23:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ioc_lat_stat

函数原型:static void ioc_lat_stat(struct ioc *ioc, unsigned int *missed_ppm_ar, unsigned int *rq_wait_pct_p)

返回类型:void

参数:

类型参数名称
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  遍历在线CPU(cpu)
1279  stat等于per_cpu_ptr(pcpu_stat, cpu)
1282 rw小于等于WRITE循环
1283  this_met等于READ_ONCE(nr_met)
1286  nr_met[rw]加等于this_metlast_met
1287  nr_missed[rw]加等于this_missedlast_missed
1288  last_met等于this_met
1289  last_missed等于this_missed
1292  this_rq_wait_ns等于READ_ONCE(rq_wait_ns)
1293  rq_wait_ns加等于this_rq_wait_nslast_rq_wait_ns
1294  last_rq_wait_ns等于this_rq_wait_ns
1297 rw小于等于WRITE循环
1298  如果nr_met[rw]加nr_missed[rw]则missed_ppm_ar[rw]等于DIV64_U64_ROUND_UP((u64)nr_missed[rw] * MILLION, nr_met[rw] + nr_missed[rw])
1302  否则missed_ppm_ar[rw]等于0
1306  rq_wait_pct_p等于div64_u64 - unsigned 64bit divide with 64bit divisor*@dividend: 64bit dividend*@divisor: 64bit divisor* This implementation is a modified version of the algorithm proposed* by the book 'Hacker's Delight'. The original source and full proof
调用者
名称描述
ioc_timer_fn