Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-stat.c Create Date:2022-07-28 17:13:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:blk_stat_add

Proto:void blk_stat_add(struct request *rq, u64 now)

Type:void

Parameter:

TypeParameterName
struct request *rq
u64now
53  q = q
59  value = If now >= Time that I/O was submitted to the device. Then now - Time that I/O was submitted to the device. Else 0
61  blk_throtl_stat_add(rq, value)
63  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
64  cpu = get_cpu()
66  If Not lk_stat_is_active() - Check if a block statistics callback is currently* gathering statistics.*@cb: The callback. Then Continue
69  bucket = bucket_fn(rq)
70  If bucket < 0 Then Continue
73  stat = per_cpu_ptr(@cpu_stat: Per-cpu statistics buckets., cpu)[bucket]
74  blk_rq_stat_add(stat, value)
76  put_cpu()
77  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()