Function report |
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 activity | Download SCCT | Chinese |
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)) |
| 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 |
| 5921 | @nice: nice level = std_nice[i++] |
| 5922 | I: the associated node ID = cpu_to_node(cpu) |
| 5925 | mutex_lock( & wq_pool_mutex) |
| 5927 | mutex_unlock( & wq_pool_mutex) |
| 5932 | When i < NR_STD_WORKER_POOLS cycle |
| 5936 | @nice: nice level = std_nice[i] |
| 5945 | @nice: nice level = std_nice[i] |
| 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 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |