函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static int rmqueue_bulk(struct zone *zone, unsigned int order, unsigned long count, struct list_head *list, int migratetype, unsigned int alloc_flags)

返回类型:int

参数:

类型参数名称
struct zone *zone
unsigned intorder
unsigned longcount
struct list_head *list
intmigratetype
unsigned intalloc_flags
2738  alloced等于0
2740  加自旋锁
2741 i小于count循环
2742  page等于Do the hard work of removing an element from the buddy allocator.* Call me with the zone->lock already held.
2744  如果此条件成立可能性小(为编译器优化)(page == NULL)则退出
2747  如果此条件成立可能性小(为编译器优化)(With DEBUG_VM disabled, free order-0 pages are checked for expected state* when pcp lists are being refilled from the free lists. With debug_pagealloc* enabled, they are also checked when being allocated from the pcp lists.)则继续下一循环
2760  添加链表项
2761  alloced自加
2762  如果is_migrate_cma(A cached value of the page's pageblock's migratetype, used when the page is* put on a pcplist)则We do not maintain differentials in a single processor configuration.* The functions directly modify the zone and global counters.
2773  We do not maintain differentials in a single processor configuration.* The functions directly modify the zone and global counters.
2774  自旋锁解锁
2775  返回:alloced
调用者
名称描述
__rmqueue_pcplistRemove page from the per-cpu list, caller must protect the list