Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:try_to_free_pages

Proto:unsigned long try_to_free_pages(struct zonelist *zonelist, int order, gfp_t gfp_mask, nodemask_t *nodemask)

Type:unsigned long

Parameter:

TypeParameterName
struct zonelist *zonelist
intorder
gfp_tgfp_mask
nodemask_t *nodemask
3260  struct scan_control sc = { How many pages shrink_list() should reclaim = SWAP_CLUSTER_MAX, This context's GFP mask = Applies per-task gfp context to the given allocation flags.* PF_MEMALLOC_NOIO implies GFP_NOIO* PF_MEMALLOC_NOFS implies GFP_NOFS* PF_MEMALLOC_NOCMA implies no allocation from CMA region., The highest zone to isolate pages for reclaim from = gfp_zone(gfp_mask), Allocation order = order, * Nodemask of nodes allowed by the caller. If NULL, all nodes * are scanned. = nodemask, Scan (total_size >> priority) pages at once = The "priority" of VM scanning is how much of the queues we will scan in one* go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the* queues ("queue_length >> 12") during an aging round., 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, Can pages be swapped as part of reclaim? = 1, }
3276  BUILD_BUG_ON - break compile if a condition is true(Free memory management - zoned buddy allocator. > S8_MAX)
3277  BUILD_BUG_ON - break compile if a condition is true(The "priority" of VM scanning is how much of the queues we will scan in one* go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the* queues ("queue_length >> 12") during an aging round. > S8_MAX)
3278  BUILD_BUG_ON - break compile if a condition is true(MAX_NR_ZONES > S8_MAX)
3285  If Throttle direct reclaimers if backing storage is backed by the network* and the PFMEMALLOC reserve for the preferred node is getting dangerously* depleted. kswapd will continue to make progress and wake the processes* when the low watermark is reached. Then Return 1
3288  set_task_reclaim_state(current process, & for recording the reclaimed slab by now )
3289  trace_mm_vmscan_direct_reclaim_begin(order, This context's GFP mask )
3291  nr_reclaimed = This is the main entry point to direct page reclaim
3293  trace_mm_vmscan_direct_reclaim_end(nr_reclaimed)
3294  set_task_reclaim_state(current process, NULL)
3296  Return nr_reclaimed
Caller
NameDescribe
__perform_reclaimPerform direct synchronous page reclaim