Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Try to free up some pages from this node through reclaim.

Proto:static int __node_reclaim(struct pglist_data *pgdat, gfp_t gfp_mask, unsigned int order)

Type:int

Parameter:

TypeParameterName
struct pglist_data *pgdat
gfp_tgfp_mask
unsigned intorder
4204  nr_pages = 1 << order
4205  p = current process
4207  struct scan_control sc = { How many pages shrink_list() should reclaim = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(nr_pages, 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., Allocation order = order, Scan (total_size >> priority) pages at once = Priority for NODE_RECLAIM. This determines the fraction of pages* of a node considered for each zone_reclaim. 4 scans 1/16th of* a zone., Writepage batching in laptop mode; RECLAIM_WRITE = !!(Node reclaim mode* If non-zero call node_reclaim when the number of free pages falls below* the watermarks. & Writeout pages during reclaim ), Can mapped pages be reclaimed? = !!(Node reclaim mode* If non-zero call node_reclaim when the number of free pages falls below* the watermarks. & Unmap pages during reclaim ), Can pages be swapped as part of reclaim? = 1, The highest zone to isolate pages for reclaim from = gfp_zone(gfp_mask), }
4218  trace_mm_vmscan_node_reclaim_begin(node_id, order, This context's GFP mask )
4221  cond_resched()
4222  fs_reclaim_acquire( This context's GFP mask )
4228  noreclaim_flag = memalloc_noreclaim_save()
4229  flags |= Allowed to write to swap
4230  set_task_reclaim_state(p, & for recording the reclaimed slab by now )
4232  If Work out how many page cache pages we can reclaim in this reclaim_mode > * zone reclaim becomes active if more unmapped pages exist. Then
4237  Do
4238  shrink_node(pgdat, & sc)
4239  When Number of pages freed so far during a call to shrink_zones() < nr_pages && -- Scan (total_size >> priority) pages at once >= 0 cycle
4242  set_task_reclaim_state(p, NULL)
4243  flags &= ~Allowed to write to swap
4244  memalloc_noreclaim_restore(noreclaim_flag)
4245  fs_reclaim_release( This context's GFP mask )
4247  trace_mm_vmscan_node_reclaim_end( Number of pages freed so far during a call to shrink_zones() )
4249  Return Number of pages freed so far during a call to shrink_zones() >= nr_pages
Caller
NameDescribe
node_reclaim