Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:drain_array_locked

Proto:static void drain_array_locked(struct kmem_cache *cachep, struct array_cache *ac, int node, bool free_all, struct list_head *list)

Type:void

Parameter:

TypeParameterName
struct kmem_cache *cachep
struct array_cache *ac
intnode
boolfree_all
struct list_head *list
2173  If Not ac || Not avail Then Return
2176  tofree = If free_all Then avail Else (limit + 4) / 5
2177  If tofree > avail Then tofree = (avail + 1) / 2
2180  Caller needs to acquire correct kmem_cache_node's list_lock*@list: List of detached free slabs should be freed by caller
2181  avail -= tofree
2182  memmove(Must have this definition in here for the proper* alignment of array_cache. Also simplifies accessing* the entries., & (Must have this definition in here for the proper* alignment of array_cache. Also simplifies accessing* the entries.[tofree]), size of * * avail)
Caller
NameDescribe
drain_cpu_caches
drain_arrayDrain an array if it contains any elements taking the node lock only if* necessary. Note that the node listlock also protects the array_cache* if drain_array() is used on the shared array.