函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static struct worker_pool *get_unbound_pool(const struct workqueue_attrs *attrs)

返回类型:struct worker_pool

参数:

类型参数名称
const struct workqueue_attrs *attrs
3581  hash等于hash value of the content of @attr
3584  target_node等于NUMA_NO_NODE
3586  lockdep_assert_held( & wq_pool_mutex)
3589  hash_for_each_possible - iterate over all possible objects hashing to the* same bucket*@name: hashtable to iterate*@obj: the type * to use as a loop cursor for each entry*@member: the name of the hlist_node within the struct*@key: the key of the objects (PL: hash of all unbound pools keyed by pool->attrs , pool, hash_node, hash)
3590  如果ent equality test
3592  返回:pool
3597  如果unbound NUMA affinity enabled
3601  target_node等于node
3602  退出
3608  pool等于根据内存节点分配内存
3609  如果非pool_worker_pool - initialize a newly zalloc'd worker_pool*@pool: worker_pool to initialize* Initialize a newly zalloc'd @pool小于0则转到:fail
3612  lockdep_set_subclass( & he pool lock , 1)
3613  copy_workqueue_attrs(I: worker attributes , attrs)
3614  I: the associated node ID 等于target_node
3620  @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. = false
3622  如果worker_pool_assign_id - allocate ID and assing it to @pool*@pool: the pool pointer of interest* Returns 0 if ID in [0, WORK_OFFQ_POOL_NONE) is allocated and assigned* successfully, -errno on failure.小于0则转到:fail
3626  如果can kworkers be created yet? 且非reate_worker - create a new workqueue worker*@pool: pool the new worker will belong to* Create and start a new worker which is attached to @pool.* CONTEXT:* Might sleep. Does GFP_KERNEL allocations.* Return:* Pointer to the newly created worker.则转到:fail
3630  hash_add - add an object to a hashtable*@hashtable: hashtable to add to*@node: the &struct hlist_node of the object to be added*@key: the key of the object to be added(PL: hash of all unbound pools keyed by pool->attrs , & PL: unbound_pool_hash node , hash)
3632  返回:pool
3633  fail :
3634  如果poolput_unbound_pool - put a worker_pool*@pool: worker_pool to put* Put @pool
3636  返回:NULL
调用者
名称描述
alloc_unbound_pwqbtain a pool matching @attr and create a pwq associating the pool and @wq