函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\gfp.h Create Date:2022-07-27 06:40:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:gfp_zone

函数原型:static inline enum zone_type gfp_zone(gfp_t flags)

返回类型:enum zone_type

参数:

类型参数名称
gfp_tflags
444  int bit = (__force int)(flags & GFP_ZONEMASK)
446  z等于GFP_ZONE_TABLE右移bitGFP_ZONES_SHIFT位按位与1左移GFP_ZONES_SHIFT位的值减1
448  VM_BUG_ON((GFP_ZONE_BAD is a bitmap for all combinations of __GFP_DMA, __GFP_DMA32* __GFP_HIGHMEM and __GFP_MOVABLE that are not permitted. One flag per* entry starting with bit 0. Bit is set if the combination is not* allowed. >> bit) & 1)
449  返回:z
调用者
名称描述
constrained_allocDetermine the type of allocation constraint.
shrink_zonesThis is the direct reclaim path, for page-allocating processes. We only* try to reclaim pages from zones which will satisfy the caller's allocation* request.* If a zone is deemed to be full of pinned pages then just give it a light
throttle_direct_reclaimThrottle direct reclaimers if backing storage is backed by the network* and the PFMEMALLOC reserve for the preferred node is getting dangerously* depleted. kswapd will continue to make progress and wake the processes* when the low watermark is reached.
try_to_free_pages
__node_reclaimTry to free up some pages from this node through reclaim.
prepare_alloc_pages
nr_free_buffer_pagesr_free_buffer_pages - count number of pages beyond high watermark* nr_free_buffer_pages() counts the number of pages which are beyond the high* watermark within ZONE_DMA and ZONE_NORMAL.* Return: number of pages beyond high watermark within ZONE_DMA and
nr_free_pagecache_pagesr_free_pagecache_pages - count number of pages beyond high watermark* nr_free_pagecache_pages() counts the number of pages which are beyond the* high watermark within all zones.* Return: number of pages beyond high watermark within all zones.
dequeue_huge_page_nodemask
policy_nodemaskReturn a nodemask representing a mempolicy for filtering nodes for* page allocation
mempolicy_slab_nodeDepending on the memory policy provide a node from which to allocate the* next slab entry.
mpol_misplacedmpol_misplaced - check whether current page node is valid in policy*@page: page to be checked*@vma: vm area where page mapped*@addr: virtual address where page mapped* Lookup current policy node id for vma,addr and "compare to" page's* node id
fallback_allocFallback function if there was no memory available and no objects on a* certain node and fall back is permitted. First we scan all the* available node for available objects. If that fails then we* perform an allocation without specifying a node
get_any_partialGet a page from somewhere. Search in increasing NUMA distances.
set_recommended_min_free_kbytes
vma_migratableCheck if a vma is migratable