Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\workqueue.c Create Date:2022-07-28 09:26:27
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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).

Proto:static void worker_enter_idle(struct worker *worker)

Type:void

Parameter:

TypeParameterName
struct worker *worker
1762  pool = A: the associated pool
1764  If WARN_ON_ONCE(X: flags & WORKER_IDLE) || WARN_ON_ONCE(!list_empty - tests whether a list is empty*@head: the list to test. && (next || pprev)) Then Return
1770  X: flags |= WORKER_IDLE
1771  L: currently idle workers ++
1772  L: last active timestamp = jiffies
1775  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
1777  If Do we have too many workers and should some go away? && Not 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, eg Then mod_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.))
Caller
NameDescribe
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