函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:wb_update_write_bandwidth

函数原型:static void wb_update_write_bandwidth(struct bdi_writeback *wb, unsigned long elapsed, unsigned long written)

返回类型:void

参数:

类型参数名称
struct bdi_writeback *wb
unsigned longelapsed
unsigned longwritten
1087  period等于undup_pow_of_two - round the given value up to nearest power of two*@n: parameter* round the given value up to the nearest power of two* - the result is undefined when n == 0* - this can be used to initialise global variables from constant data(3 * HZ)
1088  avg等于urther smoothed write bw, > 0
1089  old等于he estimated write bandwidth
1102  bw等于written两数取小(written, pages written at bw_time_stamp )
1103  bw乘等于HZ
1104  如果此条件成立可能性小(为编译器优化)(elapsed > period)则
1105  bw等于div64_ul(bw, elapsed)
1106  avg等于bw
1107  转到:out
1109  bw加等于he estimated write bandwidth periodelapsed的差
1110  bw右移等于log2 - log base 2 of 32-bit or a 64-bit unsigned value*@n: parameter* constant-capable log of base 2 calculation* - this can be used to initialise global variables from constant data, hence* the massive ternary operator construction* selects the (period)位
1115  如果avg大于oldold大于等于bwavg减等于avgold右移3位
1118  如果avg小于oldold小于等于bwavg加等于oldavg右移3位
1121  out :
1123  avg等于两数取大(avg, 1LU)
1124  如果wb_has_dirty_io(wb)则
1125  delta等于avgurther smoothed write bw, > 0
1126  WARN_ON_ONCE(atomic_long_add_return(delta, & tot_write_bandwidth) <= 0)
1129  he estimated write bandwidth 等于bw
1130  urther smoothed write bw, > 0 等于avg
调用者
名称描述
__wb_update_bandwidth