Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:page_frag_alloc

Proto:void *page_frag_alloc(struct page_frag_cache *nc, unsigned int fragsz, gfp_t gfp_mask)

Type:void

Parameter:

TypeParameterName
struct page_frag_cache *nc
unsigned intfragsz
gfp_tgfp_mask
4857  size = PAGE_SIZE
4861  If Value for the false possibility is greater at compile time(!va) Then
4862  refill :
4863  page = Page Fragment:* An arbitrary-length arbitrary-offset area of memory which resides* within a 0 or higher order page
4864  If Not page Then Return NULL
4869  size = size
4874  page_ref_add(page, PAGE_FRAG_CACHE_MAX_SIZE)
4877  pfmemalloc = Return true only if the page has been allocated with* ALLOC_NO_WATERMARKS and the low watermark was not* met implying that the system is under some pressure.
4878  we maintain a pagecount bias, so that we dont dirty cache line * containing page->_refcount every time we allocate a fragment. = PAGE_FRAG_CACHE_MAX_SIZE + 1
4879  offset = size
4882  offset = offset - fragsz
4883  If Value for the false possibility is greater at compile time(offset < 0) Then
4884  page = virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(va)
4886  If Not page_ref_sub_and_test(page, we maintain a pagecount bias, so that we dont dirty cache line * containing page->_refcount every time we allocate a fragment.) Then Go to refill
4891  size = size
4894  set_page_count(page, PAGE_FRAG_CACHE_MAX_SIZE + 1)
4897  we maintain a pagecount bias, so that we dont dirty cache line * containing page->_refcount every time we allocate a fragment. = PAGE_FRAG_CACHE_MAX_SIZE + 1
4898  offset = size - fragsz
4901  we maintain a pagecount bias, so that we dont dirty cache line * containing page->_refcount every time we allocate a fragment.--
4902  offset = offset
4904  Return va + offset