函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:alance_dirty_pages_ratelimited - balance dirty memory state*@mapping: address_space which was dirtied* Processes which are dirtying memory should call in here once for each page* which was newly dirtied. The function will periodically check the system's

函数原型:void balance_dirty_pages_ratelimited(struct address_space *mapping)

返回类型:void

参数:

类型参数名称
struct address_space *mapping
1866  inode等于host
1867  bdi等于inode_to_bdi(inode)
1868  struct bdi_writeback * wb = NULL
1872  如果非bdi_cap_account_dirty(bdi)则返回
1875  如果inode_cgwb_enabled(inode)则wb等于wb_get_create_current(bdi, GFP_KERNEL)
1877  如果非wbwb等于 the root writeback info for this bdi
1880  ratelimit等于nr_dirtied_pause
1881  如果dirty_exceededratelimit等于两数取小(ratelimit, 32 >> (PAGE_SHIFT determines the page size - 10))
1884  禁止抢占()
1891  p等于this_cpu_ptr( & bdp_ratelimits)
1892  如果此条件成立可能性小(为编译器优化)(nr_dirtied >= ratelimit)则p等于0
1894  否则如果此条件成立可能性小(为编译器优化)( * p >= After a CPU has dirtied this many pages, balance_dirty_pages_ratelimited* will look to see if it needs to force writeback or throttling.)则
1895  p等于0
1896  ratelimit等于0
1903  p等于this_cpu_ptr( & Normal tasks are throttled by* loop {* dirty tsk->nr_dirtied_pause pages;* take a snap in balance_dirty_pages();* }* However there is a worst case)
1904  如果p大于0且nr_dirtied小于ratelimit
1906  nr_pages_dirtied等于两数取小( * p, ratelimit - nr_dirtied)
1907  p减等于nr_pages_dirtied
1908  nr_dirtied加等于nr_pages_dirtied
1910  禁用抢占和中断()
1912  如果此条件成立可能性小(为编译器优化)(nr_dirtied >= ratelimit)则alance_dirty_pages() must be called by processes which are generating dirty* data
1915  wb_put(wb)
调用者
名称描述
fault_dirty_shared_pageHandle dirtying of a page in shared file mapping on a write fault.* The function expects the page to be locked and unlocks it.
iomap_write_actor
iomap_unshare_actor
generic_perform_write
cont_expand_zero