函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:pgdat->lru_lock is heavily contended. Some of the functions that* shrink the lists perform better by taking out a batch of pages* and working on them outside the LRU lock.* For pagecache intensive workloads, this function is the hottest

函数原型:static unsigned long isolate_lru_pages(unsigned long nr_to_scan, struct lruvec *lruvec, struct list_head *dst, unsigned long *nr_scanned, struct scan_control *sc, enum lru_list lru)

返回类型:unsigned long

参数:

类型参数名称
unsigned longnr_to_scan
struct lruvec *lruvec
struct list_head *dst
unsigned long *nr_scanned
struct scan_control *sc
enum lru_listlru
1653  src等于lists[lru]
1654  nr_taken等于0
1655  unsigned long nr_zone_taken[MAX_NR_ZONES] = {0}
1656  unsigned long nr_skipped[MAX_NR_ZONES] = {0, }
1657  skipped等于0
1659  LIST_HEAD(pages_skipped)
1660  mode等于如果 Can mapped pages be reclaimed? 则0否则Isolate unmapped pages
1662  total_scan等于0
1663  scan等于0
1664 scan小于nr_to_scan且非链表为空循环
1667  page等于lru_to_page(src)
1668  prefetchw_prev_lru_page(page, src, flags)
1670  VM_BUG_ON_PAGE(!PageLRU(page), page)
1672  nr_pages等于Returns the number of pages in this potentially compound page.
1673  total_scan加等于nr_pages
1678  继续下一循环
1691  scan加等于nr_pages
1694  nr_taken加等于nr_pages
1697  退出
1702  继续下一循环
1704  默认
1705  BUG()
1716  如果非链表为空
1719  为栈加入第二个链表项
1720 zid小于MAX_NR_ZONES循环
1721  如果非nr_skipped[zid]则继续下一循环
1725  skipped加等于nr_skipped[zid]
1728  nr_scanned等于total_scan
1729  trace_mm_vmscan_lru_isolate( The highest zone to isolate pages for reclaim from , Allocation order , nr_to_scan, total_scan, skipped, nr_taken, mode, lru)
1731  Update LRU sizes after isolating pages. The LRU size updates must* be complete before mem_cgroup_update_lru_size due to a santity check.
1732  返回:nr_taken
调用者
名称描述
shrink_inactive_listshrink_inactive_list() is a helper for shrink_node(). It returns the number* of reclaimed pages
shrink_active_list