Function report |
Source Code:mm\vmscan.c |
Create Date:2022-07-28 14:19:16 |
Last Modify:2022-05-23 13:41:30 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:shrink_node
Proto:static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc)
Type:bool
Parameter:
Type | Parameter | Name |
---|---|---|
pg_data_t * | pgdat | |
struct scan_control * | sc |
2703 | reclaim_state = reclaim_state |
2706 | bool reclaimable = false |
2711 | again : |
2721 | If Not force_deactivate Then |
2739 | Else may_deactivate &= ~DEACTIVATE_FILE |
2750 | If file >> Scan (total_size >> priority) pages at once && Not (may_deactivate & DEACTIVATE_FILE) Then There is easily reclaimable cold cache in the current node = 1 |
2764 | If Not cgroup_reclaim(sc) Then |
2765 | total_high_wmark = 0 |
2769 | free = sum_zone_node_page_state(node_id, NR_FREE_PAGES) |
2770 | file = node_page_state(pgdat, NR_ACTIVE_FILE) + node_page_state(pgdat, NR_INACTIVE_FILE) |
2773 | When z < MAX_NR_ZONES cycle |
2774 | zone = node_zones[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 | If reclaim_state Then |
2798 | reclaimed_slab = 0 |
2806 | If Number of pages freed so far during a call to shrink_zones() - nr_reclaimed Then reclaimable = true |
2809 | If current_is_kswapd() Then |
2827 | If writeback && writeback == taken Then Atomically set a bit in memory |
2831 | If unqueued_dirty == file_taken Then Atomically set a bit in memory |
2878 | If reclaimable Then Number of 'reclaimed == 0' runs = 0 |
2881 | Return reclaimable |
Name | Describe |
---|---|
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. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |