Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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 activityDownload SCCTChinese

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:

TypeParameterName
pg_data_t *pgdat
intorder
gfp_tgfp_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
3074  If next_mz Then mz = next_mz
3076  Else mz = mem_cgroup_largest_soft_limit_node(mctz)
3078  If Not mz Then Break
3081  nr_scanned = 0
3082  reclaimed = mem_cgroup_soft_reclaim(Back pointer, we cannot , pgdat, gfp_mask, & nr_scanned)
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)
3097  excess = soft_limit_excess(Back pointer, we cannot )
3107  __mem_cgroup_insert_exceeded(mz, mctz, excess)
3108  spin_unlock_irq( & lock)
3109  ss_put - put a css reference*@css: target css* Put a reference obtained via css_get() and css_tryget_online().
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
Caller
NameDescribe
balance_pgdatFor 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.