函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:static void pwq_adjust_max_active(struct pool_workqueue *pwq)

返回类型:void

参数:

类型参数名称
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  如果非freezableL: max active works 恒等于WQ: saved pwq max_active 则返回
3703  spin_lock_irqsave( & he pool lock , flags)
3710  如果非freezable或非PL: have wqs started freezing?
3711  L: max active works 等于WQ: saved pwq max_active
3713  当非链表为空L: nr of active works 小于L: max active works 循环
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  否则
3723  L: max active works 等于0
3726  spin_unlock_irqrestore( & he pool lock , flags)
调用者
名称描述
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.