Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:solate_freepages_range() - isolate free pages

Proto:unsigned long isolate_freepages_range(struct compact_control *cc, unsigned long start_pfn, unsigned long end_pfn)

Type:unsigned long

Parameter:

TypeParameterName
struct compact_control *cc
unsigned longstart_pfn
unsigned longend_pfn
686  LIST_HEAD(freelist)
688  pfn = start_pfn
689  block_start_pfn = pageblock_start_pfn(pfn)
690  If block_start_pfn < zone_start_pfn == zone_start_paddr >> PAGE_SHIFT Then block_start_pfn = zone_start_pfn == zone_start_paddr >> PAGE_SHIFT
692  block_end_pfn = pageblock_end_pfn(pfn)
694  When pfn < end_pfn cycle
698  isolate_start_pfn = pfn
700  block_end_pfn = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(block_end_pfn, end_pfn)
707  If pfn >= block_end_pfn Then
713  If Not pageblock_pfn_to_page(block_start_pfn, block_end_pfn, zone) Then Break
717  isolated = Isolate free pages onto a private freelist. If @strict is true, will abort* returning 0 on any invalid PFNs or non-free pages inside of the pageblock* (even though it may still end up isolating some pages).
725  If Not isolated Then Break
736  split_map_pages( & freelist)
738  If pfn < end_pfn Then
740  release_freepages( & freelist)
741  Return 0
745  Return pfn