函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:drain_array_locked

函数原型:static void drain_array_locked(struct kmem_cache *cachep, struct array_cache *ac, int node, bool free_all, struct list_head *list)

返回类型:void

参数:

类型参数名称
struct kmem_cache *cachep
struct array_cache *ac
intnode
boolfree_all
struct list_head *list
2173  如果非ac或非avail则返回
2176  tofree等于如果free_allavail否则limit加4的和除5
2177  如果tofree大于availtofree等于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]), *的长度 * avail)
调用者
名称描述
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.