Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmscan.c Create Date:2022-07-28 14:19:37
Last Modify:2022-05-23 13:41:30 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Only used by soft limit reclaim. Do not reuse for anything else.

Proto:unsigned long mem_cgroup_shrink_node(struct mem_cgroup *memcg, gfp_t gfp_mask, bool noswap, pg_data_t *pgdat, unsigned long *nr_scanned)

Type:unsigned long

Parameter:

TypeParameterName
struct mem_cgroup *memcg
gfp_tgfp_mask
boolnoswap
pg_data_t *pgdat
unsigned long *nr_scanned
3307  lruvec = mem_cgroup_lruvec - get the lru list vector for a memcg & node*@memcg: memcg of the wanted lruvec* Returns the lru list vector holding pages for a given @memcg &*@node combination. This can be the node lruvec, if the memory* controller is disabled.
3308  struct scan_control sc = { How many pages shrink_list() should reclaim = SWAP_CLUSTER_MAX, * The memory cgroup that hit its limit and as a result is the * primary target of this reclaim invocation. = memcg, Writepage batching in laptop mode; RECLAIM_WRITE = !Flag that puts the machine in "laptop mode". Doubles as a timeout in jiffies:* a full sync is triggered after this time elapses without any disk activity., Can mapped pages be reclaimed? = 1, The highest zone to isolate pages for reclaim from = MAX_NR_ZONES - 1, Can pages be swapped as part of reclaim? = !noswap, }
3317  WARN_ON_ONCE(!reclaim_state)
3319  This context's GFP mask = gfp_mask & The set of flags that only affect watermark checking and reclaim* behaviour. This is used by the MM to obey the caller constraints* about IO, FS and watermark checking while ignoring placement* hints such as HIGHMEM usage. | GFP_HIGHUSER_MOVABLE & ~The set of flags that only affect watermark checking and reclaim* behaviour. This is used by the MM to obey the caller constraints* about IO, FS and watermark checking while ignoring placement* hints such as HIGHMEM usage.
3322  trace_mm_vmscan_memcg_softlimit_reclaim_begin( Allocation order , This context's GFP mask )
3332  shrink_lruvec(lruvec, & sc)
3334  trace_mm_vmscan_memcg_softlimit_reclaim_end( Number of pages freed so far during a call to shrink_zones() )
3336  nr_scanned = Incremented by the number of inactive pages that were scanned
3338  Return Number of pages freed so far during a call to shrink_zones()
Caller
NameDescribe
mem_cgroup_soft_reclaim