函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:workqueue_init_early - early init for workqueue subsystem* This is the first half of two-staged workqueue subsystem initialization* and invoked as soon as the bare basics - memory allocation, cpumasks and* idr are up

函数原型:int __init workqueue_init_early(void)

返回类型:int

参数:

5901  int std_nice[NR_STD_WORKER_POOLS] = {0, HIGHPRI_NICE_LEVEL}
5902  hk_flags等于HK_FLAG_DOMAIN按位或HK_FLAG_WQ
5905  WARN_ON(__alignof__(structpool_workqueue) < __alignof__(longlong))
5907  BUG_ON(!分配CPU掩码)
5908  pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
5910  pwq_cache等于Please use this macro to create slab caches. Simply specify the* name of the structure and maybe some flags that are listed above.* The alignment of the struct determines object alignment. If you* f(pool_workqueue, Panic if kmem_cache_create() fails )
5913  遍历可用CPU(cpu)
5916  i等于0
5918  BUG_ON(_worker_pool - initialize a newly zalloc'd worker_pool*@pool: worker_pool to initialize* Initialize a newly zalloc'd @pool)
5919  I: the associated cpu 等于cpu
5920  pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
5921  @nice: nice level等于std_nice[i++]
5922  I: the associated node ID 等于cpu_to_node(cpu)
5925  mutex_lock( & wq_pool_mutex)
5926  BUG_ON(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.)
5927  mutex_unlock( & wq_pool_mutex)
5932 i小于NR_STD_WORKER_POOLS循环
5935  BUG_ON(!(attrs = alloc_workqueue_attrs - allocate a workqueue_attrs* Allocate a new workqueue_attrs, initialize with default settings and* return it.* Return: The allocated new workqueue_attr on success. %NULL on failure.))
5936  @nice: nice level等于std_nice[i]
5937  I: attributes used when instantiating standard unbound pools on demand [i]等于attrs
5944  BUG_ON(!(attrs = alloc_workqueue_attrs - allocate a workqueue_attrs* Allocate a new workqueue_attrs, initialize with default settings and* return it.* Return: The allocated new workqueue_attr on success. %NULL on failure.))
5945  @nice: nice level等于std_nice[i]
5946  @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. = true
5947  I: attributes used when instantiating ordered pools on demand [i]等于attrs
5950  system_wq等于alloc_workqueue("events", 0, 0)
5951  system_highpri_wq等于alloc_workqueue("events_highpri", WQ_HIGHPRI, 0)
5952  system_long_wq等于alloc_workqueue("events_long", 0, 0)
5953  system_unbound_wq等于alloc_workqueue("events_unbound", WQ_UNBOUND, unbound wq's aren't per-cpu, scale max_active according to #cpus )
5955  system_freezable_wq等于alloc_workqueue("events_freezable", WQ_FREEZABLE, 0)
5957  system_power_efficient_wq等于alloc_workqueue("events_power_efficient", WQ_POWER_EFFICIENT, 0)
5959  system_freezable_power_efficient_wq等于alloc_workqueue("events_freezable_power_efficient", WQ_FREEZABLE | WQ_POWER_EFFICIENT, 0)
5962  BUG_ON(!system_wq || !system_highpri_wq || !system_long_wq || !system_unbound_wq || !system_freezable_wq || !system_power_efficient_wq || !system_freezable_power_efficient_wq)
5967  返回:0
调用者
名称描述
start_kernel启动内核