Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:int __init workqueue_init_early(void)

Type:int

Parameter:Nothing

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(!alloc_cpumask_var( & PL: allowable cpus for unbound wqs and work items , GFP_KERNEL))
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  for_each_possible_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  When i < NR_STD_WORKER_POOLS cycle
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  Return 0