函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab.c Create Date:2022-07-27 17:17:53
Last Modify:2022-05-23 17:02:55 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Interface to system's page allocator. No need to hold the* kmem_cache_node ->list_lock.* If we requested dmaable memory, we will get it. Even if we* did not request dmaable memory, we might get it, but that* would be relatively rare and ignorable.

函数原型:static struct page *kmem_getpages(struct kmem_cache *cachep, gfp_t flags, int nodeid)

返回类型:struct page

参数:

类型参数名称
struct kmem_cache *cachep
gfp_tflags
intnodeid
1413  flags或等于gfp flags to use on each alloc
1415  page等于Allocate pages, preferring the node given as nid. The node must be valid and* online. For more general interface, see alloc_pages_node().
1416  如果非page
1417  slab_out_of_memory(cachep, flags, nodeid)
1418  返回:NULL
1421  如果charge_slab_page(page, flags, gfporder, cachep)则
1422  __free_pages(page, gfporder)
1423  返回:NULL
1426  __SetPageSlab(page)
1428  如果sk_memalloc_socks()且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.SetPageSlabPfmemalloc(page)
1431  返回:page
调用者
名称描述
cache_grow_beginGrow (by 1) the number of slabs within a cache. This is called by* kmem_cache_alloc() when there are no active objs left in a cache.