函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Do the hard work of removing an element from the buddy allocator.* Call me with the zone->lock already held.

函数原型:static __always_inline struct page *__rmqueue(struct zone *zone, unsigned int order, int migratetype, unsigned int alloc_flags)

返回类型:struct page

参数:

类型参数名称
struct zone *zone
unsigned intorder
intmigratetype
unsigned intalloc_flags
2714  retry :
2715  page等于Go through the free lists for the given migratetype and remove* the smallest available page from the freelists
2716  如果此条件成立可能性小(为编译器优化)(!page)则
2717  如果migratetype恒等于MIGRATE_MOVABLEpage等于__rmqueue_cma_fallback(zone, order)
2720  如果非pageTry 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则转到:retry
2725  trace_mm_page_alloc_zone_locked(page, order, migratetype)
2726  返回:page
调用者
名称描述
rmqueue_bulkObtain a specified number of elements from the buddy allocator, all under* a single hold of the lock, for efficiency. Add them to the supplied list.* Returns the number of new pages which were placed at *list.
rmqueueAllocate a page from the given zone. Use pcplists for order-0 allocations.