• Home
  • Raw
  • Download

Lines Matching refs:attrs

180 	struct workqueue_attrs	*attrs;		/* I: worker attributes */  member
1904 set_cpus_allowed_ptr(worker->task, pool->attrs->cpumask); in worker_attach_to_pool()
1973 pool->attrs->nice < 0 ? "H" : ""); in create_worker()
1982 set_user_nice(worker->task, pool->attrs->nice); in create_worker()
1983 kthread_bind_mask(worker->task, pool->attrs->cpumask); in create_worker()
3402 void free_workqueue_attrs(struct workqueue_attrs *attrs) in free_workqueue_attrs() argument
3404 if (attrs) { in free_workqueue_attrs()
3405 free_cpumask_var(attrs->cpumask); in free_workqueue_attrs()
3406 kfree(attrs); in free_workqueue_attrs()
3420 struct workqueue_attrs *attrs; in alloc_workqueue_attrs() local
3422 attrs = kzalloc(sizeof(*attrs), GFP_KERNEL); in alloc_workqueue_attrs()
3423 if (!attrs) in alloc_workqueue_attrs()
3425 if (!alloc_cpumask_var(&attrs->cpumask, GFP_KERNEL)) in alloc_workqueue_attrs()
3428 cpumask_copy(attrs->cpumask, cpu_possible_mask); in alloc_workqueue_attrs()
3429 return attrs; in alloc_workqueue_attrs()
3431 free_workqueue_attrs(attrs); in alloc_workqueue_attrs()
3449 static u32 wqattrs_hash(const struct workqueue_attrs *attrs) in wqattrs_hash() argument
3453 hash = jhash_1word(attrs->nice, hash); in wqattrs_hash()
3454 hash = jhash(cpumask_bits(attrs->cpumask), in wqattrs_hash()
3503 pool->attrs = alloc_workqueue_attrs(); in init_worker_pool()
3504 if (!pool->attrs) in init_worker_pool()
3567 free_workqueue_attrs(pool->attrs); in rcu_free_pool()
3660 static struct worker_pool *get_unbound_pool(const struct workqueue_attrs *attrs) in get_unbound_pool() argument
3662 u32 hash = wqattrs_hash(attrs); in get_unbound_pool()
3671 if (wqattrs_equal(pool->attrs, attrs)) { in get_unbound_pool()
3680 if (cpumask_subset(attrs->cpumask, in get_unbound_pool()
3694 copy_workqueue_attrs(pool->attrs, attrs); in get_unbound_pool()
3701 pool->attrs->no_numa = false; in get_unbound_pool()
3864 const struct workqueue_attrs *attrs) in alloc_unbound_pwq() argument
3871 pool = get_unbound_pool(attrs); in alloc_unbound_pwq()
3907 static bool wq_calc_node_cpumask(const struct workqueue_attrs *attrs, int node, in wq_calc_node_cpumask() argument
3910 if (!wq_numa_enabled || attrs->no_numa) in wq_calc_node_cpumask()
3914 cpumask_and(cpumask, cpumask_of_node(node), attrs->cpumask); in wq_calc_node_cpumask()
3922 cpumask_and(cpumask, attrs->cpumask, wq_numa_possible_cpumask[node]); in wq_calc_node_cpumask()
3930 return !cpumask_equal(cpumask, attrs->cpumask); in wq_calc_node_cpumask()
3933 cpumask_copy(cpumask, attrs->cpumask); in wq_calc_node_cpumask()
3958 struct workqueue_attrs *attrs; /* attrs to apply */ member
3974 free_workqueue_attrs(ctx->attrs); in apply_wqattrs_cleanup()
3983 const struct workqueue_attrs *attrs) in apply_wqattrs_prepare() argument
4003 copy_workqueue_attrs(new_attrs, attrs); in apply_wqattrs_prepare()
4036 copy_workqueue_attrs(new_attrs, attrs); in apply_wqattrs_prepare()
4038 ctx->attrs = new_attrs; in apply_wqattrs_prepare()
4059 copy_workqueue_attrs(ctx->wq->unbound_attrs, ctx->attrs); in apply_wqattrs_commit()
4087 const struct workqueue_attrs *attrs) in apply_workqueue_attrs_locked() argument
4103 ctx = apply_wqattrs_prepare(wq, attrs); in apply_workqueue_attrs_locked()
4133 const struct workqueue_attrs *attrs) in apply_workqueue_attrs() argument
4140 ret = apply_workqueue_attrs_locked(wq, attrs); in apply_workqueue_attrs()
4200 if (wq_calc_node_cpumask(wq->dfl_pwq->pool->attrs, node, cpu_off, cpumask)) { in wq_update_unbound_numa()
4201 if (cpumask_equal(cpumask, pwq->pool->attrs->cpumask)) in wq_update_unbound_numa()
4734 pr_cont(" cpus=%*pbl", nr_cpumask_bits, pool->attrs->cpumask); in pr_cont_pool_info()
4737 pr_cont(" flags=0x%x nice=%d", pool->flags, pool->attrs->nice); in pr_cont_pool_info()
5082 pool->attrs->cpumask) < 0); in rebind_workers()
5145 if (!cpumask_test_cpu(cpu, pool->attrs->cpumask)) in restore_unbound_workers_cpumask()
5148 cpumask_and(&cpumask, pool->attrs->cpumask, cpu_online_mask); in restore_unbound_workers_cpumask()
5583 struct workqueue_attrs *attrs; in wq_sysfs_prep_attrs() local
5587 attrs = alloc_workqueue_attrs(); in wq_sysfs_prep_attrs()
5588 if (!attrs) in wq_sysfs_prep_attrs()
5591 copy_workqueue_attrs(attrs, wq->unbound_attrs); in wq_sysfs_prep_attrs()
5592 return attrs; in wq_sysfs_prep_attrs()
5599 struct workqueue_attrs *attrs; in wq_nice_store() local
5604 attrs = wq_sysfs_prep_attrs(wq); in wq_nice_store()
5605 if (!attrs) in wq_nice_store()
5608 if (sscanf(buf, "%d", &attrs->nice) == 1 && in wq_nice_store()
5609 attrs->nice >= MIN_NICE && attrs->nice <= MAX_NICE) in wq_nice_store()
5610 ret = apply_workqueue_attrs_locked(wq, attrs); in wq_nice_store()
5616 free_workqueue_attrs(attrs); in wq_nice_store()
5638 struct workqueue_attrs *attrs; in wq_cpumask_store() local
5643 attrs = wq_sysfs_prep_attrs(wq); in wq_cpumask_store()
5644 if (!attrs) in wq_cpumask_store()
5647 ret = cpumask_parse(buf, attrs->cpumask); in wq_cpumask_store()
5649 ret = apply_workqueue_attrs_locked(wq, attrs); in wq_cpumask_store()
5653 free_workqueue_attrs(attrs); in wq_cpumask_store()
5675 struct workqueue_attrs *attrs; in wq_numa_store() local
5680 attrs = wq_sysfs_prep_attrs(wq); in wq_numa_store()
5681 if (!attrs) in wq_numa_store()
5686 attrs->no_numa = !v; in wq_numa_store()
5687 ret = apply_workqueue_attrs_locked(wq, attrs); in wq_numa_store()
5692 free_workqueue_attrs(attrs); in wq_numa_store()
6074 cpumask_copy(pool->attrs->cpumask, cpumask_of(cpu)); in workqueue_init_early()
6075 pool->attrs->nice = std_nice[i++]; in workqueue_init_early()
6087 struct workqueue_attrs *attrs; in workqueue_init_early() local
6089 BUG_ON(!(attrs = alloc_workqueue_attrs())); in workqueue_init_early()
6090 attrs->nice = std_nice[i]; in workqueue_init_early()
6091 unbound_std_wq_attrs[i] = attrs; in workqueue_init_early()
6098 BUG_ON(!(attrs = alloc_workqueue_attrs())); in workqueue_init_early()
6099 attrs->nice = std_nice[i]; in workqueue_init_early()
6100 attrs->no_numa = true; in workqueue_init_early()
6101 ordered_wq_attrs[i] = attrs; in workqueue_init_early()