Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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 activityDownload SCCTChinese

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:

TypeParameterName
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)
1282  When rw <= WRITE cycle
1286  nr_met[rw] += this_met - last_met
1288  last_met = this_met
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
1297  When rw <= WRITE cycle
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
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
Caller
NameDescribe
ioc_timer_fn