Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__wb_update_bandwidth

Proto:static void __wb_update_bandwidth(struct dirty_throttle_control *gdtc, struct dirty_throttle_control *mdtc, unsigned long start_time, bool update_ratelimit)

Type:void

Parameter:

TypeParameterName
struct dirty_throttle_control *gdtc
struct dirty_throttle_control *mdtc
unsigned longstart_time
boolupdate_ratelimit
1350  wb = wb
1351  now = jiffies
1352  elapsed = now - last time write bw is updated
1356  lockdep_assert_held( & protects the b_* lists )
1361  If elapsed < Estimate write bandwidth at 200ms intervals. Then Return
1364  dirtied = percpu_counter_read( & stat[WB_DIRTIED])
1365  written = percpu_counter_read( & stat[WB_WRITTEN])
1371  If elapsed > HZ && time_before(last time write bw is updated , start_time) Then Go to snapshot
1374  If update_ratelimit Then
1375  domain_update_bandwidth(gdtc, now)
1376  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.
1387  wb_update_write_bandwidth(wb, elapsed, written)
1389  snapshot :
1390  dirtied_stamp = dirtied
1391  pages written at bw_time_stamp = written
1392  last time write bw is updated = now
Caller
NameDescribe
wb_update_bandwidth
balance_dirty_pagesalance_dirty_pages() must be called by processes which are generating dirty* data