Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swap.c Create Date:2022-07-28 14:13:07
Last Modify:2022-05-23 13:40:24 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:pagevec_lru_move_fn

Proto:static void pagevec_lru_move_fn(struct pagevec *pvec, void (*move_fn)(struct page *page, struct lruvec *lruvec, void *arg), void *arg)

Type:void

Parameter:

TypeParameterName
struct pagevec *pvec
void (*move_fn
void *arg
195  struct pglist_data * pgdat = NULL
197  flags = 0
199  When i < pagevec_count(pvec) cycle
200  page = pages[i]
201  pagepgdat = page_pgdat(page)
203  If pagepgdat != pgdat Then
206  pgdat = pagepgdat
210  lruvec = mem_cgroup_page_lruvec(page, pgdat)
211  ( * move_fn)(page, lruvec, arg)
213  If pgdat Then spin_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)
Caller
NameDescribe
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.