Lines Matching refs:node
155 int node; /* I: the associated node ID */ member
435 list_for_each_entry((worker), &(pool)->workers, node) \
587 int node) in unbound_pwq_by_node() argument
597 if (unlikely(node == NUMA_NO_NODE)) in unbound_pwq_by_node()
600 return rcu_dereference_raw(wq->numa_pwq_tbl[node]); in unbound_pwq_by_node()
1573 static int workqueue_select_cpu_near(int node) in workqueue_select_cpu_near() argument
1582 if (node < 0 || node >= MAX_NUMNODES || !node_online(node)) in workqueue_select_cpu_near()
1587 if (node == cpu_to_node(cpu)) in workqueue_select_cpu_near()
1591 cpu = cpumask_any_and(cpumask_of_node(node), cpu_online_mask); in workqueue_select_cpu_near()
1617 bool queue_work_node(int node, struct workqueue_struct *wq, in queue_work_node() argument
1637 int cpu = workqueue_select_cpu_near(node); in queue_work_node()
1846 static struct worker *alloc_worker(int node) in alloc_worker() argument
1850 worker = kzalloc_node(sizeof(*worker), GFP_KERNEL, node); in alloc_worker()
1854 INIT_LIST_HEAD(&worker->node); in alloc_worker()
1888 list_add_tail(&worker->node, &pool->workers); in worker_attach_to_pool()
1910 list_del(&worker->node); in worker_detach_from_pool()
1947 worker = alloc_worker(pool->node); in create_worker()
1959 worker->task = kthread_create_on_node(worker_thread, worker, pool->node, in create_worker()
3467 pool->node = NUMA_NO_NODE; in init_worker_pool()
3646 int node; in get_unbound_pool() local
3661 for_each_node(node) { in get_unbound_pool()
3663 wq_numa_possible_cpumask[node])) { in get_unbound_pool()
3664 target_node = node; in get_unbound_pool()
3677 pool->node = target_node; in get_unbound_pool()
3857 pwq = kmem_cache_alloc_node(pwq_cache, GFP_KERNEL, pool->node); in alloc_unbound_pwq()
3889 static bool wq_calc_node_cpumask(const struct workqueue_attrs *attrs, int node, in wq_calc_node_cpumask() argument
3896 cpumask_and(cpumask, cpumask_of_node(node), attrs->cpumask); in wq_calc_node_cpumask()
3904 cpumask_and(cpumask, attrs->cpumask, wq_numa_possible_cpumask[node]); in wq_calc_node_cpumask()
3921 int node, in numa_pwq_tbl_install() argument
3932 old_pwq = rcu_access_pointer(wq->numa_pwq_tbl[node]); in numa_pwq_tbl_install()
3933 rcu_assign_pointer(wq->numa_pwq_tbl[node], pwq); in numa_pwq_tbl_install()
3950 int node; in apply_wqattrs_cleanup() local
3952 for_each_node(node) in apply_wqattrs_cleanup()
3953 put_pwq_unlocked(ctx->pwq_tbl[node]); in apply_wqattrs_cleanup()
3970 int node; in apply_wqattrs_prepare() local
4008 for_each_node(node) { in apply_wqattrs_prepare()
4009 if (wq_calc_node_cpumask(new_attrs, node, -1, tmp_attrs->cpumask)) { in apply_wqattrs_prepare()
4010 ctx->pwq_tbl[node] = alloc_unbound_pwq(wq, tmp_attrs); in apply_wqattrs_prepare()
4011 if (!ctx->pwq_tbl[node]) in apply_wqattrs_prepare()
4015 ctx->pwq_tbl[node] = ctx->dfl_pwq; in apply_wqattrs_prepare()
4038 int node; in apply_wqattrs_commit() local
4046 for_each_node(node) in apply_wqattrs_commit()
4047 ctx->pwq_tbl[node] = numa_pwq_tbl_install(ctx->wq, node, in apply_wqattrs_commit()
4048 ctx->pwq_tbl[node]); in apply_wqattrs_commit()
4155 int node = cpu_to_node(cpu); in wq_update_unbound_numa() local
4176 pwq = unbound_pwq_by_node(wq, node); in wq_update_unbound_numa()
4184 if (wq_calc_node_cpumask(wq->dfl_pwq->pool->attrs, node, cpu_off, cpumask)) { in wq_update_unbound_numa()
4201 old_pwq = numa_pwq_tbl_install(wq, node, pwq); in wq_update_unbound_numa()
4209 old_pwq = numa_pwq_tbl_install(wq, node, wq->dfl_pwq); in wq_update_unbound_numa()
4421 int node; in destroy_workqueue() local
4488 for_each_node(node) { in destroy_workqueue()
4489 pwq = rcu_access_pointer(wq->numa_pwq_tbl[node]); in destroy_workqueue()
4490 RCU_INIT_POINTER(wq->numa_pwq_tbl[node], NULL); in destroy_workqueue()
4719 if (pool->node != NUMA_NO_NODE) in pr_cont_pool_info()
4720 pr_cont(" node=%d", pool->node); in pr_cont_pool_info()
5506 int node, written = 0; in wq_pool_ids_show() local
5510 for_each_node(node) { in wq_pool_ids_show()
5512 "%s%d:%d", delim, node, in wq_pool_ids_show()
5513 unbound_pwq_by_node(wq, node)->pool->id); in wq_pool_ids_show()
5958 int node, cpu; in wq_numa_init() local
5986 for_each_node(node) in wq_numa_init()
5987 BUG_ON(!zalloc_cpumask_var_node(&tbl[node], GFP_KERNEL, in wq_numa_init()
5988 node_online(node) ? node : NUMA_NO_NODE)); in wq_numa_init()
5991 node = cpu_to_node(cpu); in wq_numa_init()
5992 cpumask_set_cpu(cpu, tbl[node]); in wq_numa_init()
6032 pool->node = cpu_to_node(cpu); in workqueue_init_early()
6108 pool->node = cpu_to_node(cpu); in workqueue_init()