Function report |
Source Code:mm\page_alloc.c |
Create Date:2022-07-28 15:08:39 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:This function checks whether pageblock includes unmovable pages or not.* If @count is not zero, it is okay to include less @count unmovable pages* PageLRU check without isolation or lru_lock could race so that
Proto:bool has_unmovable_pages(struct zone *zone, struct page *page, int count, int migratetype, int flags)
Type:bool
Parameter:
Type | Parameter | Name |
---|---|---|
struct zone * | zone | |
struct page * | page | |
int | count | |
int | migratetype | |
int | flags |
8178 | iter = 0 |
8179 | pfn = page_to_pfn(page) |
8180 | reason = "unmovable page" |
8190 | If is_migrate_cma_page(page) Then |
8203 | When iter < pageblock_nr_pages cycle |
8206 | If Not pfn_valid_within(check) Then Continue |
8209 | page = pfn_to_page(check) |
8211 | If PageReserved(page) Then Go to unmovable |
8219 | If zone_idx() returns 0 for the ZONE_DMA zone, 1 for the ZONE_NORMAL zone, etc.(zone) == ZONE_MOVABLE Then Continue |
8228 | head = compound_head(page) |
8231 | If Not hugepage_migration_supported(page_hstate(head)) Then Go to unmovable |
8235 | iter += skip_pages - 1 |
8236 | Continue |
8245 | If Not page_ref_count(page) Then |
8246 | If PageBuddy() indicates that the page is free and in the buddy system* (see mm/page_alloc.c). Then iter += (1 << page_order(page)) - 1 |
8248 | Continue |
8255 | If flags & MEMORY_OFFLINE && PageHWPoison(page) Then Continue |
8258 | If __PageMovable(page) Then Continue |
8279 | Return false |
8280 | unmovable : |
8281 | WARN_ON_ONCE(zone_idx() returns 0 for the ZONE_DMA zone, 1 for the ZONE_NORMAL zone, etc.(zone) == ZONE_MOVABLE) |
8282 | If flags & REPORT_FAILURE Then dump_page(pfn_to_page(pfn + iter), reason) |
8284 | Return true |
Name | Describe |
---|---|
set_migratetype_isolate |
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 |