函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Caller needs to acquire correct kmem_cache_node's list_lock*@list: List of detached free slabs should be freed by caller

函数原型:static void free_block(struct kmem_cache *cachep, void **objpp, int nr_objects, int node, struct list_head *list)

返回类型:void

参数:

类型参数名称
struct kmem_cache *cachep
void **objpp
intnr_objects
intnode
struct list_head *list
3380  n等于get_node(cachep, node)
3383  free_objects加等于nr_objects
3385 i小于nr_objects循环
3389  objp等于objpp[i]
3391  page等于virt_to_head_page(objp)
3392  删除链表项
3393  check_spinlock_acquired_node(cachep, node)
3394  slab_put_obj(cachep, page, objp)
3395  STATS_DEC_ACTIVE(cachep)
3398  如果 SLAB 恒等于0则
3400  free_slabs自加
3401  否则
3410 free_objects大于free_limit且非链表为空循环
3411  free_objects减等于num
3413  page等于list_last_entry - get the last element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.* Note, that list is expected to be not empty.( & slabs_free, structpage, slab_list)
3414  链表项移动到头部
3415  free_slabs自减
3416  total_slabs自减
调用者
名称描述
cache_free_pfmemalloc
__drain_alien_cache
__cache_free_alien
setup_kmem_cache_node
drain_array_locked
do_drain
cache_flusharray
__do_tune_cpucacheAlways called with the slab_mutex held