Lines Matching refs:migratetype

220 static inline void set_pcppage_migratetype(struct page *page, int migratetype)  in set_pcppage_migratetype()  argument
222 page->index = migratetype; in set_pcppage_migratetype()
430 void set_pageblock_migratetype(struct page *page, int migratetype) in set_pageblock_migratetype() argument
433 migratetype < MIGRATE_PCPTYPES)) in set_pageblock_migratetype()
434 migratetype = MIGRATE_UNMOVABLE; in set_pageblock_migratetype()
436 set_pfnblock_flags_mask(page, (unsigned long)migratetype, in set_pageblock_migratetype()
520 static inline unsigned int order_to_pindex(int migratetype, int order) in order_to_pindex() argument
531 return (MIGRATE_PCPTYPES * order) + migratetype; in order_to_pindex()
624 int order, int migratetype) in compaction_capture() argument
630 if (is_migrate_cma(migratetype) || in compaction_capture()
631 is_migrate_isolate(migratetype)) in compaction_capture()
640 if (order < pageblock_order && migratetype == MIGRATE_MOVABLE) in compaction_capture()
655 int order, int migratetype) in compaction_capture() argument
663 unsigned int order, int migratetype) in add_to_free_list() argument
667 list_add(&page->buddy_list, &area->free_list[migratetype]); in add_to_free_list()
673 unsigned int order, int migratetype) in add_to_free_list_tail() argument
677 list_add_tail(&page->buddy_list, &area->free_list[migratetype]); in add_to_free_list_tail()
687 unsigned int order, int migratetype) in move_to_free_list() argument
691 list_move_tail(&page->buddy_list, &area->free_list[migratetype]); in move_to_free_list()
708 int migratetype) in get_page_from_free_area() argument
710 return list_first_entry_or_null(&area->free_list[migratetype], in get_page_from_free_area()
766 int migratetype, fpi_t fpi_flags) in __free_one_page() argument
777 VM_BUG_ON(migratetype == -1); in __free_one_page()
778 if (likely(!is_migrate_isolate(migratetype))) in __free_one_page()
779 __mod_zone_freepage_state(zone, 1 << order, migratetype); in __free_one_page()
785 if (compaction_capture(capc, page, order, migratetype)) { in __free_one_page()
787 migratetype); in __free_one_page()
804 if (migratetype != buddy_mt in __free_one_page()
805 && (!migratetype_is_mergeable(migratetype) || in __free_one_page()
815 clear_page_guard(zone, buddy, order, migratetype); in __free_one_page()
835 add_to_free_list_tail(page, zone, order, migratetype); in __free_one_page()
837 add_to_free_list(page, zone, order, migratetype); in __free_one_page()
1245 int migratetype, fpi_t fpi_flags) in free_one_page() argument
1251 is_migrate_isolate(migratetype))) { in free_one_page()
1252 migratetype = get_pfnblock_migratetype(page, pfn); in free_one_page()
1254 __free_one_page(page, pfn, zone, order, migratetype, fpi_flags); in free_one_page()
1262 int migratetype; in __free_pages_ok() local
1274 migratetype = get_pfnblock_migratetype(page, pfn); in __free_pages_ok()
1278 is_migrate_isolate(migratetype))) { in __free_pages_ok()
1279 migratetype = get_pfnblock_migratetype(page, pfn); in __free_pages_ok()
1281 __free_one_page(page, pfn, zone, order, migratetype, fpi_flags); in __free_pages_ok()
1390 int low, int high, int migratetype) in expand() argument
1405 if (set_page_guard(zone, &page[size], high, migratetype)) in expand()
1408 add_to_free_list(&page[size], zone, high, migratetype); in expand()
1566 int migratetype) in __rmqueue_smallest() argument
1575 page = get_page_from_free_area(area, migratetype); in __rmqueue_smallest()
1579 expand(zone, page, order, current_order, migratetype); in __rmqueue_smallest()
1580 set_pcppage_migratetype(page, migratetype); in __rmqueue_smallest()
1581 trace_mm_page_alloc_zone_locked(page, order, migratetype, in __rmqueue_smallest()
1583 migratetype < MIGRATE_PCPTYPES); in __rmqueue_smallest()
1621 int migratetype, int *num_movable) in move_freepages() argument
1648 move_to_free_list(page, zone, order, migratetype); in move_freepages()
1657 int migratetype, int *num_movable) in move_freepages_block() argument
1674 return move_freepages(zone, start_pfn, end_pfn, migratetype, in move_freepages_block()
1679 int start_order, int migratetype) in change_pageblock_range() argument
1684 set_pageblock_migratetype(pageblock_page, migratetype); in change_pageblock_range()
1849 int migratetype, bool only_stealable, bool *can_steal) in find_suitable_fallback() argument
1859 fallback_mt = fallbacks[migratetype][i]; in find_suitable_fallback()
1863 if (can_steal_fallback(order, migratetype)) in find_suitable_fallback()
1979 set_pageblock_migratetype(page, ac->migratetype); in unreserve_highatomic_pageblock()
1980 ret = move_freepages_block(zone, page, ac->migratetype, in unreserve_highatomic_pageblock()
2086 __rmqueue(struct zone *zone, unsigned int order, int migratetype, in __rmqueue() argument
2106 page = __rmqueue_smallest(zone, order, migratetype); in __rmqueue()
2111 if (!page && __rmqueue_fallback(zone, order, migratetype, in __rmqueue()
2125 int migratetype, unsigned int alloc_flags) in rmqueue_bulk() argument
2132 struct page *page = __rmqueue(zone, order, migratetype, in rmqueue_bulk()
2310 int migratetype; in free_unref_page_prepare() local
2315 migratetype = get_pfnblock_migratetype(page, pfn); in free_unref_page_prepare()
2316 set_pcppage_migratetype(page, migratetype); in free_unref_page_prepare()
2368 struct page *page, int migratetype, in free_unref_page_commit() argument
2376 pindex = order_to_pindex(migratetype, order); in free_unref_page_commit()
2403 int migratetype, pcpmigratetype; in free_unref_page() local
2415 migratetype = pcpmigratetype = get_pcppage_migratetype(page); in free_unref_page()
2416 if (unlikely(migratetype >= MIGRATE_PCPTYPES)) { in free_unref_page()
2417 if (unlikely(is_migrate_isolate(migratetype))) { in free_unref_page()
2418 free_one_page(page_zone(page), page, pfn, order, migratetype, FPI_NONE); in free_unref_page()
2431 free_one_page(zone, page, pfn, order, migratetype, FPI_NONE); in free_unref_page()
2446 int migratetype; in free_unref_page_list() local
2460 migratetype = get_pcppage_migratetype(page); in free_unref_page_list()
2461 if (unlikely(is_migrate_isolate(migratetype))) { in free_unref_page_list()
2463 free_one_page(page_zone(page), page, pfn, 0, migratetype, FPI_NONE); in free_unref_page_list()
2472 migratetype = get_pcppage_migratetype(page); in free_unref_page_list()
2496 0, migratetype, FPI_NONE); in free_unref_page_list()
2507 if (unlikely(migratetype >= MIGRATE_PCPTYPES)) in free_unref_page_list()
2508 migratetype = MIGRATE_MOVABLE; in free_unref_page_list()
2511 free_unref_page_commit(zone, pcp, page, migratetype, 0); in free_unref_page_list()
2636 int migratetype) in rmqueue_buddy() argument
2647 page = __rmqueue(zone, order, migratetype, alloc_flags); in rmqueue_buddy()
2677 int migratetype, in __rmqueue_pcplist() argument
2700 migratetype, alloc_flags); in __rmqueue_pcplist()
2718 int migratetype, unsigned int alloc_flags) in rmqueue_pcplist() argument
2739 list = &pcp->lists[order_to_pindex(migratetype, order)]; in rmqueue_pcplist()
2740 page = __rmqueue_pcplist(zone, order, migratetype, alloc_flags, pcp, list); in rmqueue_pcplist()
2766 int migratetype) in rmqueue() argument
2778 migratetype, alloc_flags); in rmqueue()
2784 migratetype); in rmqueue()
3168 gfp_mask, alloc_flags, ac->migratetype); in get_page_from_freelist()
3975 (order > 0 && ac->migratetype != MIGRATE_MOVABLE)) in __alloc_pages_slowpath()
4183 ac->migratetype = gfp_migratetype(gfp_mask); in prepare_alloc_pages()
4332 pcp_list = &pcp->lists[order_to_pindex(ac.migratetype, 0)]; in __alloc_pages_bulk()
4341 page = __rmqueue_pcplist(zone, 0, ac.migratetype, alloc_flags, in __alloc_pages_bulk()
4448 trace_mm_page_alloc(page, order, alloc_gfp, ac.migratetype); in __alloc_pages()
6110 unsigned migratetype, gfp_t gfp_mask) in alloc_contig_range() argument
6149 ret = start_isolate_page_range(start, end, migratetype, 0, gfp_mask); in alloc_contig_range()
6230 undo_isolate_page_range(start, end, migratetype); in alloc_contig_range()
6462 int migratetype) in break_down_buddy_pages() argument
6480 if (set_page_guard(zone, current_buddy, high, migratetype)) in break_down_buddy_pages()
6484 add_to_free_list(current_buddy, zone, high, migratetype); in break_down_buddy_pages()
6508 int migratetype = get_pfnblock_migratetype(page_head, in take_page_off_buddy() local
6513 page_order, migratetype); in take_page_off_buddy()
6515 if (!is_migrate_isolate(migratetype)) in take_page_off_buddy()
6516 __mod_zone_freepage_state(zone, -1, migratetype); in take_page_off_buddy()
6535 int migratetype = get_pfnblock_migratetype(page, pfn); in put_page_back_buddy() local
6541 __free_one_page(page, pfn, zone, 0, migratetype, FPI_NONE); in put_page_back_buddy()