Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:This moves pages from @list to corresponding LRU list.* We move them the other way if the page is referenced by one or more* processes, from rmap.* If the pages are mostly unmapped, the processing is fast and it is

Proto:static unsigned __attribute__((__noinline__))move_pages_to_lru(struct lruvec *lruvec, struct list_head *list)

Type:unsigned

Parameter:

TypeParameterName
struct lruvec *lruvec
struct list_head *list
1846  pgdat = lruvec_pgdat(lruvec)
1847  nr_moved = 0
1848  LIST_HEAD(pages_to_free)
1852  When Not list_empty - tests whether a list is empty*@head: the list to test. cycle
1853  page = lru_to_page(list)
1854  VM_BUG_ON_PAGE(PageLRU(page), page)
1860  Continue
1862  lruvec = mem_cgroup_page_lruvec(page, pgdat)
1864  SetPageLRU(page)
1865  lru = page_lru - which LRU list should a page be on?*@page: the page to test* Returns the LRU list a page should be on, as an index* into the array of LRU lists.
1867  nr_pages = hpage_nr_pages(page)
1868  update_lru_size(lruvec, lru, page_zonenum(page), nr_pages)
1869  list_move - delete from one list and add as another's head*@list: the entry to move*@head: the head that will precede our entry
1882  Else
1883  nr_moved += nr_pages
1890  list_splice - join two lists, this is designed for stacks*@list: the new list to add.*@head: the place to add it in the first list.
1892  Return nr_moved
Caller
NameDescribe
shrink_inactive_listshrink_inactive_list() is a helper for shrink_node(). It returns the number* of reclaimed pages
shrink_active_list