函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:page_frag_alloc

函数原型:void *page_frag_alloc(struct page_frag_cache *nc, unsigned int fragsz, gfp_t gfp_mask)

返回类型:void

参数:

类型参数名称
struct page_frag_cache *nc
unsigned intfragsz
gfp_tgfp_mask
4857  size等于PAGE_SIZE
4861  如果此条件成立可能性小(为编译器优化)(!va)则
4862  refill :
4863  page等于Page Fragment:* An arbitrary-length arbitrary-offset area of memory which resides* within a 0 or higher order page
4864  如果非page则返回: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等于offsetfragsz
4883  如果此条件成立可能性小(为编译器优化)(offset < 0)则
4884  page等于virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(va)
4886  如果非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.)则转到: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等于sizefragsz
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  返回:vaoffset