| Function report | 
| Source Code: mm\memcontrol.c | Create Date:2022-07-28 16:11:04 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:mem_cgroup_soft_limit_reclaim
Proto:unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order, gfp_t gfp_mask, unsigned long *total_scanned)
Type:unsigned long
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| pg_data_t * | pgdat | |
| int | order | |
| gfp_t | gfp_mask | |
| unsigned long * | total_scanned | 
| 3047 | nr_reclaimed = 0 | 
| 3048 | struct mem_cgroup_per_node * mz, * next_mz = NULL | 
| 3050 | loop = 0 | 
| 3055 | If order > 0 Then Return 0 | 
| 3058 | mctz = soft_limit_tree_node(node_id) | 
| 3065 | If Not mctz || RB_EMPTY_ROOT( & rb_root) Then Return 0 | 
| 3073 | Do | 
| 3076 | Else mz = mem_cgroup_largest_soft_limit_node(mctz) | 
| 3078 | If Not mz Then Break | 
| 3081 | nr_scanned = 0 | 
| 3084 | nr_reclaimed += reclaimed | 
| 3085 | total_scanned += nr_scanned | 
| 3086 | spin_lock_irq( & lock) | 
| 3087 | __mem_cgroup_remove_exceeded(mz, mctz) | 
| 3093 | next_mz = NULL | 
| 3094 | If Not reclaimed Then next_mz = __mem_cgroup_largest_soft_limit_node(mctz) | 
| 3107 | __mem_cgroup_insert_exceeded(mz, mctz, excess) | 
| 3108 | spin_unlock_irq( & lock) | 
| 3110 | loop++ | 
| 3116 | If Not nr_reclaimed && ( next_mz == NULL || loop > MEM_CGROUP_MAX_SOFT_LIMIT_RECLAIM_LOOPS ) Then Break | 
| 3120 | When Not nr_reclaimed cycle | 
| 3121 | If next_mz Then ss_put - put a css reference*@css: target css* Put a reference obtained via css_get() and css_tryget_online(). | 
| 3123 | Return nr_reclaimed | 
| Name | Describe | 
|---|---|
| balance_pgdat | For kswapd, balance_pgdat() will reclaim pages across a node from zones* that are eligible for use by the caller until at least one zone is* balanced.* Returns the order kswapd finished reclaiming at. | 
| 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 |