Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static int rmqueue_bulk(struct zone *zone, unsigned int order, unsigned long count, struct list_head *list, int migratetype, unsigned int alloc_flags)

Type:int

Parameter:

TypeParameterName
struct zone *zone
unsigned intorder
unsigned longcount
struct list_head *list
intmigratetype
unsigned intalloc_flags
2738  alloced = 0
2740  spin_lock( & Primarily protects free_area )
2741  When i < count cycle
2742  page = Do the hard work of removing an element from the buddy allocator.* Call me with the zone->lock already held.
2744  If Value for the false possibility is greater at compile time(page == NULL) Then Break
2747  If Value for the false possibility is greater at compile time(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.) Then Continue
2760  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
2761  alloced++
2762  If is_migrate_cma(A cached value of the page's pageblock's migratetype, used when the page is* put on a pcplist) Then 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  spin_unlock( & Primarily protects free_area )
2775  Return alloced
Caller
NameDescribe
__rmqueue_pcplistRemove page from the per-cpu list, caller must protect the list