函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_alloc.c Create Date:2022-07-27 16:34:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static void reserve_highatomic_pageblock(struct page *page, struct zone *zone, unsigned int alloc_order)

返回类型:void

参数:

类型参数名称
struct page *page
struct zone *zone
unsigned intalloc_order
2512  max_managed等于zone_managed_pages(zone)除100加pageblock_nr_pages
2513  如果nr_reserved_highatomic大于等于max_managed则返回
2516  spin_lock_irqsave( & 自旋锁, flags)
2519  如果nr_reserved_highatomic大于等于max_managed则转到:out_unlock
2523  mt等于get_pageblock_migratetype(page)
2524  如果非is_migrate_highatomic(mt)且非is_migrate_isolate(mt)且非is_migrate_cma(mt)则
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( & 自旋锁, flags)
调用者
名称描述
get_page_from_freelistget_page_from_freelist goes through the zonelist trying to allocate* a page.