Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:zone_watermark_fast

Proto:static inline bool zone_watermark_fast(struct zone *z, unsigned int order, unsigned long mark, int classzone_idx, unsigned int alloc_flags)

Type:bool

Parameter:

TypeParameterName
struct zone *z
unsigned intorder
unsigned longmark
intclasszone_idx
unsigned intalloc_flags
3479  free_pages = zone_page_state(z, First 128 byte cacheline (assuming 64 bit words) )
3480  cma_pages = 0
3484  If Not (alloc_flags & allow allocations from CMA areas ) Then cma_pages = zone_page_state(z, NR_FREE_CMA_PAGES)
3495  If Not order && free_pages - cma_pages > mark + * We don't know if the memory that we're going to allocate will be * freeable or/and it will be released eventually, so to avoid totally * wasting several GB of ram we must reserve some of the lower zone * memory (otherwise we risk to run OOM on the lower [classzone_idx] Then Return true
3498  Return Return true if free base pages are above 'mark'. For high-order checks it* will return true of the order-0 watermark is reached and there is at least* one free page of a suitable size. Checking now avoids taking the zone lock
Caller
NameDescribe
get_page_from_freelistget_page_from_freelist goes through the zonelist trying to allocate* a page.