函数逻辑报告 |
Source Code:mm\vmscan.c |
Create Date:2022-07-27 15:42:05 |
Last Modify:2022-05-23 13:41:30 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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 long | nr_to_scan | |
struct lruvec * | lruvec | |
struct list_head * | dst | |
unsigned long * | nr_scanned | |
struct scan_control * | sc | |
enum lru_list | 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) |
1673 | total_scan加等于nr_pages |
1701 | 链表项移动到头部 |
1702 | 继续下一循环 |
1704 | 默认 |
1705 | BUG() |
1716 | 如果非链表为空则 |
1719 | 为栈加入第二个链表项 |
1720 | 以zid小于MAX_NR_ZONES循环 |
1721 | 如果非nr_skipped[zid]则继续下一循环 |
1724 | __count_zid_vm_events(PGSCAN_SKIP, zid, 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) |
1732 | 返回:nr_taken |
名称 | 描述 |
---|---|
shrink_inactive_list | shrink_inactive_list() is a helper for shrink_node(). It returns the number* of reclaimed pages |
shrink_active_list |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |