函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:static unsigned __attribute__((__noinline__))move_pages_to_lru(struct lruvec *lruvec, struct list_head *list)

返回类型:unsigned

参数:

类型参数名称
struct lruvec *lruvec
struct list_head *list
1846  pgdat等于lruvec_pgdat(lruvec)
1847  nr_moved等于0
1848  LIST_HEAD(pages_to_free)
1852  当非链表为空循环
1853  page等于lru_to_page(list)
1854  VM_BUG_ON_PAGE(PageLRU(page), page)
1860  继续下一循环
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  链表项移动到头部
1880  否则添加链表项
1882  否则
1883  nr_moved加等于nr_pages
1890  为栈加入第二个链表项
1892  返回:nr_moved
调用者
名称描述
shrink_inactive_listshrink_inactive_list() is a helper for shrink_node(). It returns the number* of reclaimed pages
shrink_active_list