Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static void free_block(struct kmem_cache *cachep, void **objpp, int nr_objects, int node, struct list_head *list)

Type:void

Parameter:

TypeParameterName
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  When i < nr_objects cycle
3389  objp = objpp[i]
3391  page = virt_to_head_page(objp)
3392  deletes entry from list
3393  check_spinlock_acquired_node(cachep, node)
3394  slab_put_obj(cachep, page, objp)
3395  STATS_DEC_ACTIVE(cachep)
3398  If SLAB == 0 Then
3400  free_slabs++
3401  Else
3410  When free_objects > free_limit && Not list_empty - tests whether a list is empty*@head: the list to test. cycle
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  list_move - delete from one list and add as another's head*@list: the entry to move*@head: the head that will precede our entry
3415  free_slabs--
3416  total_slabs--
Caller
NameDescribe
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