函数逻辑报告 |
Source Code:mm\vmscan.c |
Create Date:2022-07-27 15:43:12 |
| Last Modify:2022-05-23 13:41:30 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:shrink_node
函数原型:static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc)
返回类型:bool
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| pg_data_t * | pgdat | |
| struct scan_control * | sc |
| 2703 | reclaim_state等于reclaim_state |
| 2706 | bool reclaimable = false |
| 2711 | again : |
| 2721 | 如果非force_deactivate则 |
| 2739 | 否则may_deactivate与等于DEACTIVATE_FILE的反 |
| 2750 | 如果file右移 Scan (total_size >> priority) pages at once 位且非may_deactivate按位与DEACTIVATE_FILE的值则 There is easily reclaimable cold cache in the current node 等于1 |
| 2764 | 如果非cgroup_reclaim(sc)则 |
| 2765 | total_high_wmark等于0 |
| 2773 | 以z小于MAX_NR_ZONES循环 |
| 2774 | zone等于包含了结点中各内存域的数据结构[z] |
| 2778 | total_high_wmark加等于high_wmark_pages(zone) |
| 2786 | anon等于node_page_state(pgdat, NR_INACTIVE_ANON) |
| 2794 | shrink_node_memcgs(pgdat, sc) |
| 2796 | 如果reclaim_state则 |
| 2798 | reclaimed_slab等于0 |
| 2806 | 如果 Number of pages freed so far during a call to shrink_zones() 减nr_reclaimed则reclaimable = true |
| 2809 | 如果current_is_kswapd()则 |
| 2831 | 如果unqueued_dirty恒等于file_taken则设置内存位 |
| 2878 | 如果reclaimable则 Number of 'reclaimed == 0' runs 等于0 |
| 2881 | 返回:reclaimable |
| 名称 | 描述 |
|---|---|
| shrink_zones | This is the direct reclaim path, for page-allocating processes. We only* try to reclaim pages from zones which will satisfy the caller's allocation* request.* If a zone is deemed to be full of pinned pages then just give it a light |
| kswapd_shrink_node | kswapd shrinks a node of pages that are at or below the highest usable* zone that is currently unbalanced.* Returns true if kswapd scanned at least the requested number of pages to* reclaim or if the lack of progress was due to pages under writeback. |
| __node_reclaim | Try to free up some pages from this node through reclaim. |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |