函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lkg_rwstat_add - add a value to a blkg_rwstat*@rwstat: target blkg_rwstat*@op: REQ_OP and flags*@val: value to add* Add @val to @rwstat. The counters are chosen according to @rw. The* caller is responsible for synchronizing calls to this function.

函数原型:static inline void blkg_rwstat_add(struct blkg_rwstat *rwstat, unsigned int op, uint64_t val)

返回类型:void

参数:

类型参数名称
struct blkg_rwstat *rwstat
unsigned intop
uint64_tval
66  如果op_is_discard(op)则cnt等于cpu_cnt[BLKG_RWSTAT_DISCARD]
68  否则如果op_is_write(op)则cnt等于cpu_cnt[BLKG_RWSTAT_WRITE]
70  否则cnt等于cpu_cnt[BLKG_RWSTAT_READ]
73  percpu_counter_add_batch(cnt, val, percpu_counter batch for blkg_[rw]stats, per-cpu drift doesn't matter )
75  如果Reads are always treated as synchronous, as are requests with the FUA or* PREFLUSH flag. Other operations may be marked as synchronous using the* REQ_SYNC flag.cnt等于cpu_cnt[BLKG_RWSTAT_SYNC]
77  否则cnt等于cpu_cnt[BLKG_RWSTAT_ASYNC]
80  This function is both preempt and irq safe. The former is due to explicit* preemption disable. The latter is guaranteed by the fact that the slow path* is explicitly protected by an irq-safe spinlock whereas the fast patch uses
调用者
名称描述
blk_throtl_bio