函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:pageout is called by shrink_page_list() for each dirty page.* Calls ->writepage().

函数原型:static pageout_t pageout(struct page *page, struct address_space *mapping)

返回类型:pageout_t

参数:

类型参数名称
struct page *page
struct address_space *mapping
809  如果非is_page_cache_freeable(page)则返回:PAGE_KEEP
811  如果非mapping
816  如果页面私有占用
817  如果try_to_free_buffers(page)则
819  打印信息("%s: orphaned page\n", __func__)
820  返回:PAGE_CLEAN
823  返回:PAGE_KEEP
825  如果(writepage == NULL)则返回:PAGE_ACTIVATE
827  如果非may_write_to_inode(host)则返回:PAGE_KEEP
830  如果Clear a page's dirty flag, while caring for dirty memory accounting.* Returns true if the page was previously dirty.* This is for preparing to put the page under writeout. We leave the page* tagged as dirty in the xarray so that a concurrent write-for-sync
832  struct writeback_control wbc = {sync_mode = WB_SYNC_NONE, Write this many pages, and decrementthis for each page written = SWAP_CLUSTER_MAX, For a_ops->writepages(): if start or end are non-zero then this is* a hint that the filesystem need only write out the pages inside that* byterange. The byte at `end' is included in the writeout request. = 0, range_end = LLONG_MAX, Invoked from the page allocator = 1, }
840  PG_readahead is only used for reads; PG_reclaim is only for writes
841  res等于writepage(page, & wbc)
842  如果res小于0则We detected a synchronous write error writing a page out. Probably* -ENOSPC. We need to propagate that into the address_space for a subsequent* fsync(), msync() or close().* The tricky part is that after writepage we cannot touch the mapping: nothing
844  如果res恒等于AOP_WRITEPAGE_ACTIVATE
846  返回:PAGE_ACTIVATE
853  trace_mm_vmscan_writepage(page)
854  inc_node_page_state(page, NR_VMSCAN_WRITE)
855  返回:PAGE_SUCCESS
858  返回:PAGE_CLEAN
调用者
名称描述
shrink_page_listshrink_page_list() returns the number of reclaimed pages