Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__shuffle_zone

Proto:void __meminit __shuffle_zone(struct zone *z)

Type:void

Parameter:

TypeParameterName
struct zone *z
108  start_pfn = zone_start_pfn == zone_start_paddr >> PAGE_SHIFT
109  end_pfn = zone_end_pfn(z)
110  order = SHUFFLE_ORDER
111  order_pages = 1 << order
113  spin_lock_irqsave( & Primarily protects free_area , flags)
114  start_pfn = @a is a power of 2 value (start_pfn, order_pages)
115  When i < end_pfn cycle
126  page_i = For two pages to be swapped in the shuffle, they must be free (on a* 'free_area' lru), have the same order, and have the same migratetype.
127  If Not page_i Then Continue
141  If page_j && page_j != page_i Then Break
145  pr_debug("%s: failed to swap %#lx\n", __func__, i)
146  Continue
154  migratetype = get_pageblock_migratetype(page_i)
156  pr_debug("%s: migratetype mismatch %#lx\n", __func__, i)
157  Continue
160  list_swap - replace entry1 with entry2 and re-add entry1 at entry2's position*@entry1: the location to place entry2*@entry2: the location to place entry1
162  pr_debug("%s: swap: %#lx -> %#lx\n", __func__, i, j)
165  If i % 100 * order_pages == 0 Then
167  cond_resched()
171  spin_unlock_irqrestore( & Primarily protects free_area , flags)