Function report |
Source Code:mm\page_alloc.c |
Create Date:2022-07-28 15:04:21 |
| 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 implements actual steal behaviour. If order is large enough,* we can steal whole pageblock. If not, we first move freepages in this* pageblock to our migratetype and determine how many already-allocated pages
Proto:static void steal_suitable_fallback(struct zone *zone, struct page *page, unsigned int alloc_flags, int start_type, bool whole_block)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct zone * | zone | |
| struct page * | page | |
| unsigned int | alloc_flags | |
| int | start_type | |
| bool | whole_block |
| 2385 | current_order = page_order(page) |
| 2396 | If is_migrate_highatomic(old_block_type) Then Go to single_page |
| 2400 | If current_order >= Huge pages are a constant size Then |
| 2402 | Go to single_page |
| 2410 | boost_watermark(zone) |
| 2411 | If alloc_flags & allow waking of kswapd Then Atomically set a bit in memory |
| 2415 | If Not whole_block Then Go to single_page |
| 2418 | free_pages = move_freepages_block(zone, page, start_type, & movable_pages) |
| 2425 | If start_type == MIGRATE_MOVABLE Then |
| 2426 | alike_pages = movable_pages |
| 2427 | Else |
| 2435 | If old_block_type == MIGRATE_MOVABLE Then alike_pages = pageblock_nr_pages - free_pages + movable_pages |
| 2438 | Else alike_pages = 0 |
| 2443 | If Not free_pages Then Go to single_page |
| 2450 | If free_pages + alike_pages >= 1 << Huge pages are a constant size - 1 || page_group_by_mobility_disabled Then set_pageblock_migratetype(page, start_type) |
| 2454 | Return |
| 2456 | single_page : |
| Name | Describe |
|---|---|
| __rmqueue_fallback | Try finding a free buddy page on the fallback list and put it on the free* list of requested migratetype, possibly along with other pages from the same* block, depending on fragmentation avoidance heuristics. Returns true if |
| 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 |