Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memcontrol.c Create Date:2022-07-28 16:09:59
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:mem_cgroup_soft_reclaim

Proto:static int mem_cgroup_soft_reclaim(struct mem_cgroup *root_memcg, pg_data_t *pgdat, gfp_t gfp_mask, unsigned long *total_scanned)

Type:int

Parameter:

TypeParameterName
struct mem_cgroup *root_memcg
pg_data_t *pgdat
gfp_tgfp_mask
unsigned long *total_scanned
1587  struct mem_cgroup * victim = NULL
1588  total = 0
1589  loop = 0
1592  struct mem_cgroup_reclaim_cookie reclaim = {pgdat = pgdat, }
1596  excess = soft_limit_excess(root_memcg)
1598  When 1 cycle
1599  victim = mem_cgroup_iter - iterate over memory cgroup hierarchy*@root: hierarchy root*@prev: previously returned memcg, NULL on first invocation*@reclaim: cookie for shared reclaim walks, NULL for full walks* Returns references to children of the hierarchy below
1600  If Not victim Then
1601  loop++
1602  If loop >= 2 Then
1620  Continue
1622  total += Only used by soft limit reclaim. Do not reuse for anything else.
1624  total_scanned += nr_scanned
1625  If Not soft_limit_excess(root_memcg) Then Break
1628  mem_cgroup_iter_break - abort a hierarchy walk prematurely*@root: hierarchy root*@prev: last visited hierarchy member as returned by mem_cgroup_iter()
1629  Return total
Caller
NameDescribe
mem_cgroup_soft_limit_reclaim