函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:wq_update_unbound_numa - update NUMA affinity of a wq for CPU hot[un]plug*@wq: the target workqueue*@cpu: the CPU coming up or going down*@online: whether @cpu is coming up or going down* This function is to be called from %CPU_DOWN_PREPARE, %CPU_ONLINE

函数原型:static void wq_update_unbound_numa(struct workqueue_struct *wq, int cpu, bool online)

返回类型:void

参数:

类型参数名称
struct workqueue_struct *wq
intcpu
boolonline
4077  node等于cpu_to_node(cpu)
4078  cpu_off等于如果online则负1否则cpu
4079  old_pwq等于NULL
4083  lockdep_assert_held( & wq_pool_mutex)
4085  如果非unbound NUMA affinity enabled 或非hot fields used during command issue, aligned to cacheline 按位与WQ_UNBOUND的值或@no_numa: disable NUMA affinity* Unlike other fields, ``no_numa`` isn't a property of a worker_pool. It* only modifies how :c:func:`apply_workqueue_attrs` select pools and thus* doesn't participate in pool hash calculations or equality comparisons.则返回
4094  target_attrs等于uf for wq_update_unbound_numa_attrs(), protected by CPU hotplug exclusion
4095  cpumask等于@cpumask: allowed CPUs
4097  copy_workqueue_attrs(target_attrs, PW: only for unbound wqs )
4098  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
4106  如果wq_calc_node_cpumask - calculate a wq_attrs' cpumask for the specified node*@attrs: the wq_attrs of the default pwq of the target workqueue*@node: the target NUMA node*@cpu_going_down: if >= 0, the CPU to consider as offline*@cpumask: outarg, the
4107  如果pumask_equal - *src1p == *src2p*@src1p: the first input*@src2p: the second input则返回
4109  否则
4110  转到:use_dfl_pwq
4114  pwq等于btain a pool matching @attr and create a pwq associating the pool and @wq
4115  如果非pwq
4116  打印警告信息("workqueue: allocation failed while updating NUMA affinity of \"%s\"\n", I: workqueue name )
4118  转到:use_dfl_pwq
4122  mutex_lock( & protects this wq )
4123  old_pwq等于stall @pwq into @wq's numa_pwq_tbl[] for @node and return the old pwq
4124  转到:out_unlock
4126  use_dfl_pwq :
4127  mutex_lock( & protects this wq )
4128  spin_lock_irq( & he pool lock )
4129  get_pwq - get an extra reference on the specified pool_workqueue*@pwq: pool_workqueue to get* Obtain an extra reference on @pwq. The caller should guarantee that*@pwq has positive refcnt and be holding the matching pool->lock.
4130  spin_unlock_irq( & he pool lock )
4131  old_pwq等于stall @pwq into @wq's numa_pwq_tbl[] for @node and return the old pwq
4132  out_unlock :
4133  mutex_unlock( & protects this wq )
4134  put_pwq_unlocked - put_pwq() with surrounding pool lock/unlock*@pwq: pool_workqueue to put (can be %NULL)* put_pwq() with locking. This function also allows %NULL @pwq.
调用者
名称描述
workqueue_initworkqueue_init - bring workqueue subsystem fully online* This is the latter half of two-staged workqueue subsystem initialization* and invoked as soon as kthreads can be created and scheduled