Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:workqueue_congested - test whether a workqueue is congested*@cpu: CPU in question*@wq: target workqueue* Test whether @wq's cpu workqueue for @cpu is congested. There is* no synchronization around this function and the test result is

Proto:bool workqueue_congested(int cpu, struct workqueue_struct *wq)

Type:bool

Parameter:

TypeParameterName
intcpu
struct workqueue_struct *wq
4515  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
4516  Even if we don't have any preemption, we need preempt disable/enable* to be barriers, so that we don't have things like get_user/put_user* that can cause faults and scheduling migrate into our preempt-protected* region.()
4518  If cpu == WORK_CPU_UNBOUND Then cpu = smp_processor_id()
4521  If Not (hot fields used during command issue, aligned to cacheline & WQ_UNBOUND) Then pwq = per_cpu_ptr(I: per-cpu pwqs , cpu)
4523  Else pwq = bound_pwq_by_node - return the unbound pool_workqueue for the given node*@wq: the target workqueue*@node: the node ID* This must be called with any of wq_pool_mutex, wq->mutex or RCU* read locked
4526  ret = Not list_empty - tests whether a list is empty*@head: the list to test.
4527  preempt_enable()
4528  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
4530  Return ret