函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:pagevec_lru_move_fn

函数原型:static void pagevec_lru_move_fn(struct pagevec *pvec, void (*move_fn)(struct page *page, struct lruvec *lruvec, void *arg), void *arg)

返回类型:void

参数:

类型参数名称
struct pagevec *pvec
void (*move_fn
void *arg
195  struct pglist_data * pgdat = NULL
197  flags等于0
199 i小于pagevec_count(pvec)循环
200  page等于pages[i]
201  pagepgdat等于page_pgdat(page)
203  如果pagepgdat不等于pgdat
206  pgdat等于pagepgdat
210  lruvec等于mem_cgroup_page_lruvec(page, pgdat)
211  ( * move_fn)(page, lruvec, arg)
213  如果pgdatspin_unlock_irqrestore( & Write-intensive fields used by page reclaim , flags)
215  lease_pages - batched put_page()*@pages: array of pages to release*@nr: number of pages* Decrement the reference count on all the pages in @pages. If it* fell to zero, remove the page from the LRU and free it.
216  pagevec_reinit(pvec)
调用者
名称描述
pagevec_move_tailpagevec_move_tail() must be called with IRQ disabled.* Otherwise this may cause nasty races.
lru_add_drain_cpuDrain pages out of the cpu's pagevecs.* Either "cpu" is the current CPU, and preemption has already been* disabled; or "cpu" is being hot-unplugged, and is already dead.
deactivate_file_pagedeactivate_file_page - forcefully deactivate a file page*@page: page to deactivate* This function hints the VM that @page is a good reclaim candidate,* for example if its invalidation fails due to the page being dirty* or under writeback.
deactivate_pagedeactivate_page - deactivate a page*@page: page to deactivate* deactivate_page() moves @page to the inactive list if @page was on the active* list and was not an unevictable page. This is done to accelerate the reclaim* of @page.
mark_page_lazyfreemark_page_lazyfree - make an anon page lazyfree*@page: page to deactivate* mark_page_lazyfree() moves @page to the inactive file list.* This is done to accelerate the reclaim of @page.
__pagevec_lru_addAdd the passed pages to the LRU, then drop the caller's refcount* on them. Reinitialises the caller's pagevec.