| Function report | 
| Source Code: mm\compaction.c | Create Date:2022-07-28 14:30:40 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name: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).
Proto:static unsigned long isolate_freepages_block(struct compact_control *cc, unsigned long *start_pfn, unsigned long end_pfn, struct list_head *freelist, unsigned int stride, bool strict)
Type:unsigned long
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct compact_control * | cc | |
| unsigned long * | start_pfn | |
| unsigned long | end_pfn | |
| struct list_head * | freelist | |
| unsigned int | stride | |
| bool | strict | 
| 542 | nr_scanned = 0 , total_isolated = 0 | 
| 544 | flags = 0 | 
| 545 | bool locked = false | 
| 553 | cursor = pfn_to_page(blockpfn) | 
| 570 | nr_scanned++ | 
| 571 | If Not pfn_valid_within(blockpfn) Then Go to isolate_fail | 
| 580 | If PageCompound(page) Then | 
| 590 | If Not PageBuddy() indicates that the page is free and in the buddy system* (see mm/page_alloc.c). Then Go to isolate_fail | 
| 600 | If Not locked Then | 
| 611 | isolated = __isolate_free_page(page, order) | 
| 612 | If Not isolated Then Break | 
| 614 | set_page_private(page, order) | 
| 616 | total_isolated += isolated | 
| 620 | If Not strict && Number of pages to migrate <= Number of isolated free pages Then | 
| 627 | Continue | 
| 629 | isolate_fail : | 
| 630 | If strict Then Break | 
| 632 | Else Continue | 
| 637 | If locked Then spin_unlock_irqrestore( & Primarily protects free_area , flags) | 
| 644 | If Value for the false possibility is greater at compile time(blockpfn > end_pfn) Then blockpfn = end_pfn | 
| 658 | If strict && blockpfn < end_pfn Then total_isolated = 0 | 
| 661 | total_free_scanned += nr_scanned | 
| 662 | If total_isolated Then count_compact_events(COMPACTISOLATED, total_isolated) | 
| 664 | Return total_isolated | 
| Name | Describe | 
|---|---|
| isolate_freepages_range | solate_freepages_range() - isolate free pages | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |