Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:put_unbound_pool - put a worker_pool*@pool: worker_pool to put* Put @pool

Proto:static void put_unbound_pool(struct worker_pool *pool)

Type:void

Parameter:

TypeParameterName
struct worker_pool *pool
3516  Lockdep needs to run a non-constant initializer for on-stack* completions - so we use the _ONSTACK() variant for those that* are on the kernel stack:(detach_completion)
3519  lockdep_assert_held( & wq_pool_mutex)
3521  If --PL: refcnt for unbound pools Then Return
3525  If WARN_ON(!(I: the associated cpu < 0)) || WARN_ON(!list_empty - tests whether a list is empty*@head: the list to test.) Then Return
3530  If I: pool ID >= 0 Then dr_remove() - Remove an ID from the IDR
3532  hash_del - remove an object from a hashtable*@node: &struct hlist_node of the object to remove
3539  spin_lock_irq( & he pool lock )
3540  wait_event_lock_irq - sleep until a condition gets true(wq_manager_wait, !(X: flags & POOL_MANAGER_ACTIVE), he pool lock )
3542  X: flags |= POOL_MANAGER_ACTIVE
3544  When worker = Return the first idle worker. Safe with preemption disabled cycle
3545  destroy_worker - destroy a workqueue worker*@worker: worker to be destroyed* Destroy @worker and adjust @pool stats accordingly. The worker should* be idle.* CONTEXT:* spin_lock_irq(pool->lock).
3546  WARN_ON(L: total number of workers || L: currently idle workers )
3547  spin_unlock_irq( & he pool lock )
3549  mutex_lock( & wq_pool_attach_mutex)
3550  If Not list_empty - tests whether a list is empty*@head: the list to test. Then all workers detached = detach_completion
3552  mutex_unlock( & wq_pool_attach_mutex)
3554  If all workers detached Then wait_for_completion(all workers detached )
3558  del_timer_sync( & L: worker idle timeout )
3559  del_timer_sync( & L: SOS timer for workers )
3562  Exported common interfaces
Caller
NameDescribe
get_unbound_poolget_unbound_pool - get a worker_pool with the specified attributes*@attrs: the attributes of the worker_pool to get* Obtain a worker_pool which has the same attributes as @attrs, bump the* reference count and return it
pwq_unbound_release_workfnScheduled on system_wq by put_pwq() when an unbound pwq hits zero refcnt* and needs to be destroyed.
alloc_unbound_pwqbtain a pool matching @attr and create a pwq associating the pool and @wq