Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\backing-dev.c Create Date:2022-07-28 14:24:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:wb_init

Proto:static int wb_init(struct bdi_writeback *wb, struct backing_dev_info *bdi, int blkcg_id, gfp_t gfp)

Type:int

Parameter:

TypeParameterName
struct bdi_writeback *wb
struct backing_dev_info *bdi
intblkcg_id
gfp_tgfp
289  memset(wb, 0, size of wb )
291  If wb != the root writeback info for this bdi Then bdi_get(bdi)
293  ur parent bdi = bdi
294  last old data flush = jiffies
295  Initialization list head
296  Initialization list head
297  Initialization list head
298  Initialization list head
299  Process spin lock initialization( & protects the b_* lists )
301  last time write bw is updated = jiffies
302  balanced_dirty_ratelimit = Initial write bandwidth: 100 MB/s
303  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. = Initial write bandwidth: 100 MB/s
304  he estimated write bandwidth = Initial write bandwidth: 100 MB/s
305  urther smoothed write bw, > 0 = Initial write bandwidth: 100 MB/s
307  Process spin lock initialization( & protects work_list & dwork scheduling )
308  Initialization list head
309  INIT_DELAYED_WORK( & work item used for writeback , Handle writeback of dirty data for the device backed by this bdi. Also* reschedules periodically and does kupdated style flushing.)
310  last wait = jiffies
312  congested = wb_congested_get_create(bdi, blkcg_id, gfp)
313  If Not congested Then
314  err = -ENOMEM
315  Go to out_put_bdi
318  err = fprop_local_init_percpu( & completions, gfp)
319  If err Then Go to out_put_cong
322  When i < NR_WB_STAT_ITEMS cycle
323  err = percpu_counter_init( & stat[i], 0, gfp)
324  If err Then Go to out_destroy_stat
328  Return 0
330  out_destroy_stat :
331  When i-- cycle
332  percpu_counter_destroy( & stat[i])
333  fprop_local_destroy_percpu( & completions)
334  out_put_cong :
335  wb_congested_put(congested)
336  out_put_bdi :
337  If wb != the root writeback info for this bdi Then bdi_put(bdi)
339  Return err
Caller
NameDescribe
cgwb_bdi_init