函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Fallback 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

函数原型:static void *fallback_alloc(struct kmem_cache *cache, gfp_t flags)

返回类型:void

参数:

类型参数名称
struct kmem_cache *cache
gfp_tflags
3157  high_zoneidx等于gfp_zone(flags)
3158  void * obj = NULL
3163  如果flags按位与__GFP_THISNODE则返回:NULL
3166  retry_cpuset :
3167  cpuset_mems_cookie等于read_mems_allowed_begin()
3168  zonelist等于We get the zone list from the current node and the gfp_mask.* This zone list contains a maximum of MAXNODES*MAX_NR_ZONES zones.* There are two zonelists per node, one for all zones with memory and
3170  retry :
3175  r_each_zone_zonelist - helper macro to iterate over valid zones in a zonelist at or below a given zone index*@zone - The current zone in the iterator*@z - The current pointer within zonelist->zones being iterated*@zlist - The zonelist being (zone, z, zonelist, high_zoneidx)
3176  nid等于zone_to_nid(zone)
3183  如果obj退出
3188  如果非obj
3195  page等于Grow (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.
3196  cache_grow_end(cache, page)
3197  如果page
3198  nid等于page_to_nid(page)
3206  如果非obj则转到:retry
3211  如果此条件成立可能性小(为编译器优化)(!obj && read_mems_allowed_retry(cpuset_mems_cookie))则转到:retry_cpuset
3213  返回:obj
调用者
名称描述
____cache_alloc_nodeA interface to enable slab creation on nodeid
slab_alloc_node