函数逻辑报告 |
Source Code:mm\vmscan.c |
Create Date:2022-07-27 15:42:22 |
Last Modify:2022-05-23 13:41:30 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:shrink_inactive_list() is a helper for shrink_node(). It returns the number* of reclaimed pages
函数原型:static __attribute__((__noinline__)) unsigned long shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec, struct scan_control *sc, enum lru_list lru)
返回类型:unsigned long
参数:
类型 | 参数 | 名称 |
---|---|---|
unsigned long | nr_to_scan | |
struct lruvec * | lruvec | |
struct scan_control * | sc | |
enum lru_list | lru |
1918 | nr_reclaimed等于0 |
1921 | file等于is_file_lru(lru) |
1923 | pgdat等于lruvec_pgdat(lruvec) |
1924 | reclaim_stat等于reclaim_stat |
1925 | bool stalled = false |
1928 | 如果stalled则返回:0 |
1932 | msleep - sleep safely even with waitqueue interruptions*@msecs: Time in milliseconds to sleep for |
1933 | stalled = true |
1936 | 如果fatal_signal_pending(当前进程)则返回:SWAP_CLUSTER_MAX |
1940 | lru_add_drain() |
1947 | __mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, nr_taken) |
1948 | recent_scanned[file]加等于nr_taken |
1950 | item等于如果current_is_kswapd()则PGSCAN_KSWAPD否则PGSCAN_DIRECT |
1951 | 如果非cgroup_reclaim(sc)则__count_vm_events(item, nr_scanned) |
1953 | __count_memcg_events(lruvec_memcg(lruvec), item, nr_scanned) |
1956 | 如果nr_taken恒等于0则返回:0 |
1964 | item等于如果current_is_kswapd()则PGSTEAL_KSWAPD否则PGSTEAL_DIRECT |
1965 | 如果非cgroup_reclaim(sc)则__count_vm_events(item, nr_reclaimed) |
1973 | __mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, - nr_taken) |
1977 | mem_cgroup_uncharge_list( & page_list) |
1978 | free_unref_page_list( & page_list) |
1995 | congested加等于nr_congested |
1996 | unqueued_dirty加等于nr_unqueued_dirty |
1997 | writeback加等于nr_writeback |
1998 | immediate加等于nr_immediate |
2000 | 如果file则file_taken加等于nr_taken |
2003 | trace_mm_vmscan_lru_shrink_inactive(全局结点ID, nr_scanned, nr_reclaimed, & stat, Scan (total_size >> priority) pages at once , file) |
2005 | 返回:nr_reclaimed |
名称 | 描述 |
---|---|
shrink_list |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |