函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blk_stat_add

函数原型:void blk_stat_add(struct request *rq, u64 now)

返回类型:void

参数:

类型参数名称
struct request *rq
u64now
53  q等于q
59  value等于如果now大于等于 Time that I/O was submitted to the device. now Time that I/O was submitted to the device. 否则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  如果非lk_stat_is_active() - Check if a block statistics callback is currently* gathering statistics.*@cb: The callback.则继续下一循环
69  bucket等于bucket_fn(rq)
70  如果bucket小于0则继续下一循环
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()