Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:start_isolate_page_range() - make page-allocation-type of range of pages to* be MIGRATE_ISOLATE.*@start_pfn: The lower PFN of the range to be isolated.*@end_pfn: The upper PFN of the range to be isolated.

Proto:int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, unsigned migratetype, int flags)

Type:int

Parameter:

TypeParameterName
unsigned longstart_pfn
unsigned longend_pfn
unsignedmigratetype
intflags
200  nr_isolate_pageblock = 0
202  BUG_ON(!IS_ALIGNED(start_pfn, pageblock_nr_pages))
203  BUG_ON(!IS_ALIGNED(end_pfn, pageblock_nr_pages))
205  When pfn < end_pfn cycle
208  page = __first_valid_page(pfn, pageblock_nr_pages)
209  If page Then
211  undo_pfn = pfn
212  Go to undo
217  Return nr_isolate_pageblock
218  undo :
219  When pfn < undo_pfn cycle
222  page = Return page for the valid pfn only if the page is online. All pfn* walkers which rely on the fully initialized page->flags and others* should use this rather than pfn_valid && pfn_to_page(pfn)
223  If Not page Then Continue
225  unset_migratetype_isolate(page, migratetype)
228  Return -EBUSY