Lines Matching refs:node
155 int node; /* I: the associated node ID */ member
416 list_for_each_entry((worker), &(pool)->workers, node) \
568 int node) in unbound_pwq_by_node() argument
578 if (unlikely(node == NUMA_NO_NODE)) in unbound_pwq_by_node()
581 return rcu_dereference_raw(wq->numa_pwq_tbl[node]); in unbound_pwq_by_node()
1562 static int workqueue_select_cpu_near(int node) in workqueue_select_cpu_near() argument
1571 if (node < 0 || node >= MAX_NUMNODES || !node_online(node)) in workqueue_select_cpu_near()
1576 if (node == cpu_to_node(cpu)) in workqueue_select_cpu_near()
1580 cpu = cpumask_any_and(cpumask_of_node(node), cpu_online_mask); in workqueue_select_cpu_near()
1606 bool queue_work_node(int node, struct workqueue_struct *wq, in queue_work_node() argument
1626 int cpu = workqueue_select_cpu_near(node); in queue_work_node()
1849 static struct worker *alloc_worker(int node) in alloc_worker() argument
1853 worker = kzalloc_node(sizeof(*worker), GFP_KERNEL, node); in alloc_worker()
1857 INIT_LIST_HEAD(&worker->node); in alloc_worker()
1889 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()
3458 pool->node = NUMA_NO_NODE; in init_worker_pool()
3637 int node; in get_unbound_pool() local
3652 for_each_node(node) { in get_unbound_pool()
3654 wq_numa_possible_cpumask[node])) { in get_unbound_pool()
3655 target_node = node; in get_unbound_pool()
3668 pool->node = target_node; in get_unbound_pool()
3848 pwq = kmem_cache_alloc_node(pwq_cache, GFP_KERNEL, pool->node); in alloc_unbound_pwq()
3880 static bool wq_calc_node_cpumask(const struct workqueue_attrs *attrs, int node, in wq_calc_node_cpumask() argument
3887 cpumask_and(cpumask, cpumask_of_node(node), attrs->cpumask); in wq_calc_node_cpumask()
3895 cpumask_and(cpumask, attrs->cpumask, wq_numa_possible_cpumask[node]); in wq_calc_node_cpumask()
3912 int node, in numa_pwq_tbl_install() argument
3923 old_pwq = rcu_access_pointer(wq->numa_pwq_tbl[node]); in numa_pwq_tbl_install()
3924 rcu_assign_pointer(wq->numa_pwq_tbl[node], pwq); in numa_pwq_tbl_install()
3941 int node; in apply_wqattrs_cleanup() local
3943 for_each_node(node) in apply_wqattrs_cleanup()
3944 put_pwq_unlocked(ctx->pwq_tbl[node]); in apply_wqattrs_cleanup()
3960 int node; in apply_wqattrs_prepare() local
3997 for_each_node(node) { in apply_wqattrs_prepare()
3998 if (wq_calc_node_cpumask(new_attrs, node, -1, tmp_attrs->cpumask)) { in apply_wqattrs_prepare()
3999 ctx->pwq_tbl[node] = alloc_unbound_pwq(wq, tmp_attrs); in apply_wqattrs_prepare()
4000 if (!ctx->pwq_tbl[node]) in apply_wqattrs_prepare()
4004 ctx->pwq_tbl[node] = ctx->dfl_pwq; in apply_wqattrs_prepare()
4027 int node; in apply_wqattrs_commit() local
4035 for_each_node(node) in apply_wqattrs_commit()
4036 ctx->pwq_tbl[node] = numa_pwq_tbl_install(ctx->wq, node, in apply_wqattrs_commit()
4037 ctx->pwq_tbl[node]); in apply_wqattrs_commit()
4144 int node = cpu_to_node(cpu); in wq_update_unbound_numa() local
4165 pwq = unbound_pwq_by_node(wq, node); in wq_update_unbound_numa()
4173 if (wq_calc_node_cpumask(wq->dfl_pwq->pool->attrs, node, cpu_off, cpumask)) { in wq_update_unbound_numa()
4190 old_pwq = numa_pwq_tbl_install(wq, node, pwq); in wq_update_unbound_numa()
4198 old_pwq = numa_pwq_tbl_install(wq, node, wq->dfl_pwq); in wq_update_unbound_numa()
4410 int node; in destroy_workqueue() local
4477 for_each_node(node) { in destroy_workqueue()
4478 pwq = rcu_access_pointer(wq->numa_pwq_tbl[node]); in destroy_workqueue()
4479 RCU_INIT_POINTER(wq->numa_pwq_tbl[node], NULL); in destroy_workqueue()
4708 if (pool->node != NUMA_NO_NODE) in pr_cont_pool_info()
4709 pr_cont(" node=%d", pool->node); in pr_cont_pool_info()
5478 int node, written = 0; in wq_pool_ids_show() local
5482 for_each_node(node) { in wq_pool_ids_show()
5484 "%s%d:%d", delim, node, in wq_pool_ids_show()
5485 unbound_pwq_by_node(wq, node)->pool->id); in wq_pool_ids_show()
5935 int node, cpu; in wq_numa_init() local
5963 for_each_node(node) in wq_numa_init()
5964 BUG_ON(!zalloc_cpumask_var_node(&tbl[node], GFP_KERNEL, in wq_numa_init()
5965 node_online(node) ? node : NUMA_NO_NODE)); in wq_numa_init()
5968 node = cpu_to_node(cpu); in wq_numa_init()
5969 cpumask_set_cpu(cpu, tbl[node]); in wq_numa_init()
6009 pool->node = cpu_to_node(cpu); in workqueue_init_early()
6085 pool->node = cpu_to_node(cpu); in workqueue_init()