Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static void *fallback_alloc(struct kmem_cache *cache, gfp_t flags)

Type:void

Parameter:

TypeParameterName
struct kmem_cache *cache
gfp_tflags
3157  high_zoneidx = gfp_zone(flags)
3158  void * obj = NULL
3163  If flags & __GFP_THISNODE Then Return 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  If obj Then Break
3188  If Not obj Then
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  If page Then
3198  nid = page_to_nid(page)
3206  If Not obj Then Go to retry
3211  If Value for the false possibility is greater at compile time(!obj && read_mems_allowed_retry(cpuset_mems_cookie)) Then Go to retry_cpuset
3213  Return obj
Caller
NameDescribe
____cache_alloc_nodeA interface to enable slab creation on nodeid
slab_alloc_node