函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:gfp_to_alloc_flags

函数原型:static inline unsigned int gfp_to_alloc_flags(gfp_t gfp_mask)

返回类型:unsigned int

参数:

类型参数名称
gfp_tgfp_mask
4175  alloc_flags等于The ALLOC_WMARK bits are used as an index to zone->watermark 按位或check for correct cpuset
4178  BUILD_BUG_ON - break compile if a condition is true(__GFP_HIGH != (__forcegfp_t)__GFP_HIGH set )
4186  alloc_flags |= (__force int)(gfp_mask & __GFP_HIGH)
4188  如果gfp_mask按位与DOC: Watermark modifiers* Watermark modifiers -- controls access to emergency reserves* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* %__GFP_HIGH indicates that the caller is high-priority and that granting
4193  如果非gfp_mask按位与__GFP_NOMEMALLOC的值则alloc_flags或等于ry to alloc harder
4199  alloc_flags与等于check for correct cpuset 的反
4200  否则如果此条件成立可能性小(为编译器优化)(rt_task(当前进程))且非in_interrupt()则alloc_flags或等于ry to alloc harder
4203  如果gfp_mask按位与kswapd can wake alloc_flags或等于allow waking of kswapd
4207  如果gfpflags_to_migratetype(gfp_mask)恒等于MIGRATE_MOVABLEalloc_flags或等于allow allocations from CMA areas
4210  返回:alloc_flags
调用者
名称描述
__alloc_pages_slowpath