Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Frees a number of pages from the PCP lists* Assumes all pages on list are in same zone, and of same order.* count is the number of pages to free.* If the zone was previously in an "all pages pinned" state then look to

Proto:static void free_pcppages_bulk(struct zone *zone, int count, struct per_cpu_pages *pcp)

Type:void

Parameter:

TypeParameterName
struct zone *zone
intcount
struct per_cpu_pages *pcp
1252  migratetype = 0
1253  batch_free = 0
1254  prefetch_nr = 0
1257  LIST_HEAD(head)
1259  When count cycle
1269  Do
1270  batch_free++
1271  If ++migratetype == MIGRATE_PCPTYPES Then migratetype = 0
1274  When list_empty - tests whether a list is empty*@head: the list to test. cycle
1277  If batch_free == MIGRATE_PCPTYPES Then batch_free = count
1280  Do
1286  If bulkfree_pcp_prepare(page) Then Continue
1302  When --count && --batch_free && Not list_empty - tests whether a list is empty*@head: the list to test. cycle
1305  spin_lock( & Primarily protects free_area )
1306  isolated_pageblocks = has_isolate_pageblock(zone)
1313  mt = A cached value of the page's pageblock's migratetype, used when the page is* put on a pcplist
1315  VM_BUG_ON_PAGE(is_migrate_isolate(mt), page)
1317  If Value for the false possibility is greater at compile time(isolated_pageblocks) Then mt = get_pageblock_migratetype(page)
1320  Freeing function for a buddy system allocator
1321  trace_mm_page_pcpu_drain(page, 0, mt)
1323  spin_unlock( & Primarily protects free_area )
Caller
NameDescribe
drain_zone_pagesCalled from the vmstat counter updater to drain pagesets of this* currently executing processor on remote nodes after they have* expired.* Note that this function must be called with the thread pinned to* a single processor.
drain_pages_zoneDrain pcplists of the indicated processor and zone.* The processor must either be the current processor and the* thread pinned to the current processor or a processor that* is not online.
free_unref_page_commit