Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Reserve a pageblock for exclusive use of high-order atomic allocations if* there are no empty page blocks that contain a page with a suitable order

Proto:static void reserve_highatomic_pageblock(struct page *page, struct zone *zone, unsigned int alloc_order)

Type:void

Parameter:

TypeParameterName
struct page *page
struct zone *zone
unsigned intalloc_order
2512  max_managed = zone_managed_pages(zone) / 100 + pageblock_nr_pages
2513  If nr_reserved_highatomic >= max_managed Then Return
2516  spin_lock_irqsave( & Primarily protects free_area , flags)
2519  If nr_reserved_highatomic >= max_managed Then Go to out_unlock
2523  mt = get_pageblock_migratetype(page)
2524  If Not is_migrate_highatomic(mt) && Not is_migrate_isolate(mt) && Not is_migrate_cma(mt) Then
2526  nr_reserved_highatomic += pageblock_nr_pages
2527  set_pageblock_migratetype(page, MIGRATE_HIGHATOMIC)
2528  move_freepages_block(zone, page, MIGRATE_HIGHATOMIC, NULL)
2531  out_unlock :
2532  spin_unlock_irqrestore( & Primarily protects free_area , flags)
Caller
NameDescribe
get_page_from_freelistget_page_from_freelist goes through the zonelist trying to allocate* a page.