函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ache_reap - Reclaim memory from caches

函数原型:static void cache_reap(struct work_struct *w)

返回类型:void

参数:

类型参数名称
struct work_struct *w
4032  node等于Returns the number of the nearest Node with memory
4033  work等于to_delayed_work(w)
4035  如果非mutex_trylock - try to acquire the mutex, without waiting*@lock: the mutex to be acquired* Try to acquire the mutex atomically则转到:out
4040  check_irq_on()
4047  n等于get_node(searchp, node)
4049  Called from cache_reap() to regularly drain alien caches round robin.
4051  Drain 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.
4057  如果These inlines deal with timer wrapping correctly. You are * strongly encouraged to use them* 1. Because people otherwise forget* 2. Because if the timer wrap changes in future you won't have to* alter your driver code.(next_reap, jiffies)则转到:next
4060  next_reap等于jiffiesREAPTIMEOUT_NODE
4062  Drain 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.
4064  如果free_touchedfree_touched等于0
4066  否则
4069  freed等于drain_freelist(searchp, n, (free_limit + 5 * num - 1) / (5 * num))
4071  STATS_ADD_REAPED(searchp, freed)
4073  :
4074  cond_resched()
4076  check_irq_on()
4077  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
4078  next_reap_node()
4079  out :
4081  schedule_delayed_work_on - queue work in global workqueue on CPU after delay*@cpu: cpu to use*@dwork: job to be done*@delay: number of jiffies to wait* After waiting for a given time this puts a job in the kernel-global* workqueue on the specified CPU.