函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:worker_enter_idle - enter idle state*@worker: worker which is entering idle state*@worker is entering idle state. Update stats and idle timer if* necessary.* LOCKING:* spin_lock_irq(pool->lock).

函数原型:static void worker_enter_idle(struct worker *worker)

返回类型:void

参数:

类型参数名称
struct worker *worker
1762  pool等于A: the associated pool
1764  如果WARN_ON_ONCE(X: flags & WORKER_IDLE)或WARN_ON_ONCE(!链表为空 && (next || pprev))则返回
1770  X: flags 或等于WORKER_IDLE
1771  L: currently idle workers 自加
1772  L: last active timestamp 等于jiffies
1775  添加链表项
1777  如果Do we have too many workers and should some go away? 且非mer_pending - is a timer pending?*@timer: the timer in question* timer_pending will tell whether a given timer is currently pending,* or not. Callers must ensure serialization wrt. other operations done* to this timer, egmod_timer( & L: worker idle timeout , jiffies + IDLE_WORKER_TIMEOUT)
1786  WARN_ON_ONCE(!(X: flags & POOL_DISASSOCIATED) && L: total number of workers == L: currently idle workers && atomic_read( & The current concurrency level. As it's likely to be accessed* from other CPUs during try_to_wake_up(), put it in a separate* cacheline.))
调用者
名称描述
create_workerreate_worker - create a new workqueue worker*@pool: pool the new worker will belong to* Create and start a new worker which is attached to @pool.* CONTEXT:* Might sleep. Does GFP_KERNEL allocations.* Return:* Pointer to the newly created worker.
worker_thread