Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:pwq_adjust_max_active - update a pwq's max_active to the current setting*@pwq: target pool_workqueue* If @pwq isn't freezing, set @pwq->max_active to the associated* workqueue's saved_max_active and activate delayed work items* accordingly

Proto:static void pwq_adjust_max_active(struct pool_workqueue *pwq)

Type:void

Parameter:

TypeParameterName
struct pool_workqueue *pwq
3691  wq = I: the owning workqueue
3692  freezable = hot fields used during command issue, aligned to cacheline & WQ_FREEZABLE
3696  lockdep_assert_held( & protects this wq )
3699  If Not freezable && L: max active works == WQ: saved pwq max_active Then Return
3703  spin_lock_irqsave( & he pool lock , flags)
3710  If Not freezable || Not PL: have wqs started freezing? Then
3711  L: max active works = WQ: saved pwq max_active
3713  When Not list_empty - tests whether a list is empty*@head: the list to test. && L: nr of active works < L: max active works cycle
3715  pwq_activate_first_delayed(pwq)
3721  wake_up_worker - wake up an idle worker*@pool: worker pool to wake worker from* Wake up the first idle worker of @pool.* CONTEXT:* spin_lock_irq(pool->lock).
3722  Else
3723  L: max active works = 0
3726  spin_unlock_irqrestore( & he pool lock , flags)
Caller
NameDescribe
link_pwqsync @pwq with the current state of its associated wq and link it
alloc_workqueue
workqueue_set_max_activeworkqueue_set_max_active - adjust max_active of a workqueue*@wq: target workqueue*@max_active: new max_active value.* Set max_active of @wq to @max_active.* CONTEXT:* Don't call from IRQ context.