Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab.c Create Date:2022-07-28 15:44:02
Last Modify:2022-05-23 17:02:55 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static struct page *kmem_getpages(struct kmem_cache *cachep, gfp_t flags, int nodeid)

Type:struct page

Parameter:

TypeParameterName
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  If Not page Then
1417  slab_out_of_memory(cachep, flags, nodeid)
1418  Return NULL
1421  If charge_slab_page(page, flags, gfporder, cachep) Then
1422  __free_pages(page, gfporder)
1423  Return NULL
1426  __SetPageSlab(page)
1428  If 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. Then SetPageSlabPfmemalloc(page)
1431  Return page
Caller
NameDescribe
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.