Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\debugobjects.c Create Date:2022-07-28 06:55:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:free_obj_work

Proto:static void free_obj_work(struct work_struct *work)

Type:void

Parameter:

TypeParameterName
struct work_struct *work
298  WRITE_ONCE(obj_freeing, false)
299  If Not raw_spin_trylock_irqsave( & pool_lock, flags) Then Return
302  If obj_pool_free >= debug_objects_pool_size Then Go to free_objs
312  When The number of objs on the global free list && obj_pool_free < debug_objects_pool_size cycle
313  obj = hlist_entry(first, typeof( * obj), node)
314  hlist_del( & node)
315  hlist_add_head( & node, & obj_pool)
316  WRITE_ONCE(obj_pool_free, obj_pool_free + 1)
317  WRITE_ONCE(The number of objs on the global free list , The number of objs on the global free list - 1)
319  raw_spin_unlock_irqrestore( & pool_lock, flags)
320  Return
322  free_objs :
328  If The number of objs on the global free list Then
329  Move a list from one list head to another. Fixup the pprev* reference of the first entry if it exists.
330  debug_objects_freed += The number of objs on the global free list
331  WRITE_ONCE(The number of objs on the global free list , 0)
333  raw_spin_unlock_irqrestore( & pool_lock, flags)
336  hlist_del( & node)
337  kmem_cache_free(obj_cache, obj)