函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__wb_update_bandwidth

函数原型:static void __wb_update_bandwidth(struct dirty_throttle_control *gdtc, struct dirty_throttle_control *mdtc, unsigned long start_time, bool update_ratelimit)

返回类型:void

参数:

类型参数名称
struct dirty_throttle_control *gdtc
struct dirty_throttle_control *mdtc
unsigned longstart_time
boolupdate_ratelimit
1350  wb等于wb
1351  now等于jiffies
1352  elapsed等于nowlast time write bw is updated
1356  lockdep_assert_held( & protects the b_* lists )
1361  如果elapsed小于Estimate write bandwidth at 200ms intervals.则返回
1364  dirtied等于percpu_counter_read( & stat[WB_DIRTIED])
1365  written等于percpu_counter_read( & stat[WB_WRITTEN])
1371  如果elapsed大于HZtime_before(last time write bw is updated , start_time)则转到:snapshot
1374  如果update_ratelimit
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
调用者
名称描述
wb_update_bandwidth
balance_dirty_pagesalance_dirty_pages() must be called by processes which are generating dirty* data