Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page-writeback.c Create Date:2022-07-28 14:09:57
Last Modify:2022-05-23 13:25:58 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:wb_update_write_bandwidth

Proto:static void wb_update_write_bandwidth(struct bdi_writeback *wb, unsigned long elapsed, unsigned long written)

Type:void

Parameter:

TypeParameterName
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 - min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(written, pages written at bw_time_stamp )
1103  bw *= HZ
1104  If Value for the false possibility is greater at compile time(elapsed > period) Then
1105  bw = div64_ul(bw, elapsed)
1106  avg = bw
1107  Go to out
1109  bw += he estimated write bandwidth * (period - elapsed)
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  If avg > old && old >= bw Then avg -= avg - old >> 3
1118  If avg < old && old <= bw Then avg += old - avg >> 3
1121  out :
1123  avg = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(avg, 1LU)
1124  If wb_has_dirty_io(wb) Then
1125  delta = avg - urther 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
Caller
NameDescribe
__wb_update_bandwidth