函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page-writeback.c Create Date:2022-07-27 15:33:37
Last Modify:2022-05-23 13:25:58 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Maintain wb->dirty_ratelimit, the base dirty throttle rate.* Normal wb tasks will be curbed at or below it in long term.* Obviously it should be around (write_bw / N) when there are N dd tasks.

函数原型:static void wb_update_dirty_ratelimit(struct dirty_throttle_control *dtc, unsigned long dirtied, unsigned long elapsed)

返回类型:void

参数:

类型参数名称
struct dirty_throttle_control *dtc
unsigned longdirtied
unsigned longelapsed
1191  wb等于wb
1192  dirty等于le_dirty + write + nfs
1193  freerun等于dirty_freerun_ceiling(dirty threshold , dirty background threshold )
1194  limit等于hard_dirty_limit(dtc_dom(dtc), dirty threshold )
1195  setpoint等于freerunlimit的和除2
1196  write_bw等于urther smoothed write bw, > 0
1197  dirty_ratelimit等于The base dirty throttle rate, re-calculated on every 200ms.* All the bdi tasks' dirty rate will be curbed under it.*@dirty_ratelimit tracks the estimated @balanced_dirty_ratelimit* in small steps and is much more smooth/stable than the latter.
1209  dirty_rate等于dirtieddirtied_stamp的差乘HZelapsed
1214  task_ratelimit等于dirty_ratelimitpos_ratio右移RATELIMIT_CALC_SHIFT
1216  task_ratelimit自加
1248  balanced_dirty_ratelimit等于div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full
1253  如果此条件成立可能性小(为编译器优化)(balanced_dirty_ratelimit > write_bw)则balanced_dirty_ratelimit等于write_bw
1290  step等于0
1303  如果此条件成立可能性小(为编译器优化)(capabilities & BDI_CAP_STRICTLIMIT)则
1304  dirty等于per-wb counterparts
1305  如果per-wb counterparts 小于8则setpoint等于per-wb counterparts 加1
1307  否则setpoint等于wb_threshwb_bg_thresh的和除2
1311  如果dirty小于setpoint
1312  x等于三数取小(balanced_dirty_ratelimit, balanced_dirty_ratelimit, task_ratelimit)
1314  如果dirty_ratelimit小于xstep等于xdirty_ratelimit
1316  否则
1317  x等于三数取大(balanced_dirty_ratelimit, balanced_dirty_ratelimit, task_ratelimit)
1319  如果dirty_ratelimit大于xstep等于dirty_ratelimitx
1328  shift等于dirty_ratelimit除2乘step加1的和
1329  如果shift小于BITS_PER_LONGstep等于DIV_ROUND_UP(step >> shift, 8)
1331  否则step等于0
1334  如果dirty_ratelimit小于balanced_dirty_ratelimitdirty_ratelimit加等于step
1336  否则dirty_ratelimit减等于step
1339  The base dirty throttle rate, re-calculated on every 200ms.* All the bdi tasks' dirty rate will be curbed under it.*@dirty_ratelimit tracks the estimated @balanced_dirty_ratelimit* in small steps and is much more smooth/stable than the latter.等于两数取大(dirty_ratelimit, 1UL)
1340  balanced_dirty_ratelimit等于balanced_dirty_ratelimit
1342  trace_bdi_dirty_ratelimit(wb, dirty_rate, task_ratelimit)
调用者
名称描述
__wb_update_bandwidth