函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmscan.c Create Date:2022-07-27 15:43:31
Last Modify:2022-05-23 13:41:30 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:try_to_free_pages

函数原型:unsigned long try_to_free_pages(struct zonelist *zonelist, int order, gfp_t gfp_mask, nodemask_t *nodemask)

返回类型:unsigned long

参数:

类型参数名称
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  如果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.则返回:1
3288  set_task_reclaim_state(当前进程, & 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(当前进程, NULL)
3296  返回:nr_reclaimed
调用者
名称描述
__perform_reclaimPerform direct synchronous page reclaim