函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Helper function for set_page_dirty family.* Caller must hold lock_page_memcg().* NOTE: This relies on being atomic wrt interrupts.

函数原型:void account_page_dirtied(struct page *page, struct address_space *mapping)

返回类型:void

参数:

类型参数名称
struct page *page
struct address_space *mapping
2414  inode等于host
2416  trace_writeback_dirty_page(page, mapping)
2418  如果mapping_cap_account_dirty(mapping)则
2421  inode_attach_wb(inode, page)
2422  wb等于inode_to_wb(inode)
2424  __inc_lruvec_page_state(page, NR_FILE_DIRTY)
2425  __inc_zone_page_state(page, NR_ZONE_WRITE_PENDING)
2426  __inc_node_page_state(page, NR_DIRTIED)
2427  inc_wb_stat(wb, WB_RECLAIMABLE)
2428  inc_wb_stat(wb, WB_DIRTIED)
2429  task_io_account_write(PAGE_SIZE)
2430  nr_dirtied自加
2431  this_cpu_inc(bdp_ratelimits)
2433  mem_cgroup_track_foreign_dirty(page, wb)
调用者
名称描述
__set_page_dirty_nobuffersFor address_spaces which do not use buffers. Just tag the page as dirty in* the xarray.* This is also used when a single buffer is being dirtied: we want to set the* page dirty in that case, but not all the buffers. This is a "bottom-up"
__set_page_dirtyMark the page dirty, and set it dirty in the page cache, and mark the inode* dirty.* If warn is true, then emit a warning if the page is not uptodate and has* not been truncated.* The caller must hold lock_page_memcg().