函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slub.c Create Date:2022-07-27 17:21:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:discard_slab

函数原型:static void discard_slab(struct kmem_cache *s, struct page *page)

返回类型:void

参数:

类型参数名称
struct kmem_cache *s
struct page *page
1752  dec_slabs_node(s, page_to_nid(page), objects)
1753  free_slab(s, page)
调用者
名称描述
deactivate_slabRemove the cpu slab
__slab_freeSlow path handling. This may still be called frequently since objects* have a longer lifetime than the cpu slabs in most processing loads.* So we still attempt to reduce cache line usage. Just take the slab* lock and free the item
free_partialAttempt to free all partial slabs on a node.* This is called from __kmem_cache_shutdown(). We must take list_lock* because sysfs file might still access partial list after the shutdowning.
__kmem_cache_shrinkkmem_cache_shrink discards empty slabs and promotes the slabs filled* up most to the head of the partial lists. New allocations will then* fill those up and thus they can be removed from the partial lists.* The slabs with the least items are placed last