Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static inline void blkg_rwstat_add(struct blkg_rwstat *rwstat, unsigned int op, uint64_t val)

Type:void

Parameter:

TypeParameterName
struct blkg_rwstat *rwstat
unsigned intop
uint64_tval
66  If op_is_discard(op) Then cnt = cpu_cnt[BLKG_RWSTAT_DISCARD]
68  Else if op_is_write(op) Then cnt = cpu_cnt[BLKG_RWSTAT_WRITE]
70  Else 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  If 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. Then cnt = cpu_cnt[BLKG_RWSTAT_SYNC]
77  Else 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
Caller
NameDescribe
blk_throtl_bio