Home
last modified time | relevance | path

Searched refs:affinity (Results 1 – 25 of 172) sorted by relevance

1234567

/linux/tools/testing/selftests/rseq/
H A Dbasic_test.c18 cpu_set_t affinity, test_affinity; in test_cpu_pointer() local
21 sched_getaffinity(0, sizeof(affinity), &affinity); in test_cpu_pointer()
24 if (CPU_ISSET(i, &affinity)) { in test_cpu_pointer()
39 sched_setaffinity(0, sizeof(affinity), &affinity); in test_cpu_pointer()
H A Dslice_test.c125 cpu_set_t affinity; in FIXTURE_SETUP() local
134 ASSERT_EQ(sched_getaffinity(0, sizeof(affinity), &affinity), 0); in FIXTURE_SETUP()
138 if (!CPU_ISSET(i, &affinity)) in FIXTURE_SETUP()
141 CPU_ZERO(&affinity); in FIXTURE_SETUP()
142 CPU_SET(i, &affinity); in FIXTURE_SETUP()
143 ASSERT_EQ(sched_setaffinity(0, sizeof(affinity), &affinity), 0); in FIXTURE_SETUP()
/linux/tools/perf/util/
H A Daffinity.h8 struct affinity { struct
14 void affinity__cleanup(struct affinity *a); argument
15 void affinity__set(struct affinity *a, int cpu);
16 int affinity__setup(struct affinity *a);
H A Daffinity.c2 /* Manage affinity to optimize IPIs inside the kernel perf API. */
11 #include "affinity.h"
25 int affinity__setup(struct affinity *a) in affinity__setup()
45 * It is more efficient to change perf's affinity to the target
49 void affinity__set(struct affinity *a, int cpu) in affinity__set()
64 * We ignore errors because affinity is just an optimization. in affinity__set()
72 static void __affinity__cleanup(struct affinity *a) in __affinity__cleanup()
82 void affinity__cleanup(struct affinity *a) in affinity__cleanup()
H A Dmmap.c98 static int perf_mmap__aio_bind(struct mmap *map, int idx, struct perf_cpu cpu, int affinity) in perf_mmap__aio_bind() argument
106 if (affinity != PERF_AFFINITY_SYS && cpu__max_node() > 1) { in perf_mmap__aio_bind()
150 struct perf_cpu cpu __maybe_unused, int affinity __maybe_unused) in perf_mmap__aio_mmap()
184 ret = perf_mmap__aio_bind(map, i, map->core.cpu, mp->affinity); in perf_mmap__aio_mmap()
279 if (mp->affinity == PERF_AFFINITY_NODE && cpu__max_node() > 1) in mmap__mmap()
281 else if (mp->affinity == PERF_AFFINITY_CPU) in mmap__mmap()
295 if (cpu.cpu >= 0 && mp->affinity != PERF_AFFINITY_SYS && in mmap__mmap()
297 pr_debug2("failed to alloc mmap affinity mask, error %d\n", in mmap__mmap()
H A Devlist.h20 #include "affinity.h"
427 int affinity, int flush, int comp_level);
591 /** If present, used to set the affinity when switching between CPUs. */
592 struct affinity *affinity;
593 /** Maybe be used to hold affinity state prior to iterating. */
594 struct affinity saved_affinity;
598 * evlist__for_each_cpu - without affinity, iterate over the evlist. With
599 * affinity, iterate over all CPUs and then the evlist
601 * CPUs the affinity i
367 struct affinity *affinity; global() member
[all...]
/linux/tools/virtio/ringtest/
H A Drun-on-all.sh20 "$@" --host-affinity $HOST_AFFINITY --guest-affinity $cpu
24 "$@" --host-affinity $HOST_AFFINITY
/linux/kernel/irq/
H A Dmanage.c167 * irq_can_set_affinity - Check if the affinity of a given irq can be set
178 * irq_can_set_affinity_usr - Check if affinity of a irq can be set from user space
193 * irq_set_thread_affinity - Notify irq threads to adjust affinity
194 * @desc: irq descriptor which has affinity changed
196 * Just set IRQTF_AFFINITY and delegate the affinity setting to the
225 pr_warn_once("irq_chip %s did not update eff. affinity mask of irq %u\n", in irq_validate_effective_affinity()
247 * it check whether the requested affinity mask intersects with in irq_do_set_affinity()
250 * the affinity setter from routing the interrupt to an isolated in irq_do_set_affinity()
259 * If all housekeeping CPUs in the affinity mask are offline, the in irq_do_set_affinity()
261 * housekeeping CPU which belongs to the affinity mas in irq_do_set_affinity()
420 irq_update_affinity_desc(unsigned int irq,struct irq_affinity_desc * affinity) irq_update_affinity_desc() argument
2493 create_percpu_irqaction(irq_handler_t handler,unsigned long flags,const char * devname,const cpumask_t * affinity,void __percpu * dev_id) create_percpu_irqaction() argument
2539 request_percpu_irq_affinity(unsigned int irq,irq_handler_t handler,const char * devname,const cpumask_t * affinity,void __percpu * dev_id) request_percpu_irq_affinity() argument
2597 request_percpu_nmi(unsigned int irq,irq_handler_t handler,const char * name,const struct cpumask * affinity,void __percpu * dev_id) request_percpu_nmi() argument
[all...]
H A Dirq_test.c120 struct irq_affinity_desc affinity = { in irq_shutdown_depth_test() local
128 virq = irq_test_setup_fake_irq(test, &affinity); in irq_shutdown_depth_test()
172 struct irq_affinity_desc affinity = { in irq_cpuhotplug_test() local
185 cpumask_copy(&affinity.mask, cpumask_of(1)); in irq_cpuhotplug_test()
187 virq = irq_test_setup_fake_irq(test, &affinity); in irq_cpuhotplug_test()
/linux/kernel/
H A Dkthread.c353 cpumask_var_t affinity; in kthread_affine_node() local
358 if (!zalloc_cpumask_var(&affinity, GFP_KERNEL)) { in kthread_affine_node()
373 kthread_fetch_affinity(kthread, affinity); in kthread_affine_node()
374 set_cpus_allowed_ptr(current, affinity); in kthread_affine_node()
377 free_cpumask_var(affinity); in kthread_affine_node()
426 * Apply default node affinity if no call to kthread_bind[_mask]() nor in kthread()
540 * in @node, to get NUMA affinity for kthread stack, or else give NUMA_NO_NODE.
828 * kthread_affine_preferred - Define a kthread's preferred affinity
833 * Similar to kthread_bind_mask() except that the affinity is not a requirement
837 * Returns 0 if the affinity ha
842 cpumask_var_t affinity; kthread_affine_preferred() local
880 cpumask_var_t affinity; kthreads_update_affinity() local
[all...]
/linux/drivers/infiniband/hw/hfi1/
H A Daffinity.c12 #include "affinity.h"
136 * The real cpu mask is part of the affinity struct but it has to be in node_affinity_init()
503 "Number of kernel receive queues is too large for completion vector affinity to be effective\n"); in _dev_comp_vect_cpu_mask_init()
533 "[%s] Completion vector affinity CPU set(s) %*pbl", in _dev_comp_vect_cpu_mask_init()
572 * Interrupt affinity.
597 * If this is the first time this NUMA node's affinity is used, in hfi1_dev_affinity_init()
598 * create an entry in the global affinity structure and initialize it. in hfi1_dev_affinity_init()
604 "Unable to allocate global affinity node\n"); in hfi1_dev_affinity_init()
726 * Function updates the irq affinity hint for msix after it has been changed
793 * This is required by affinity notifie in hfi1_irq_notifier_release()
955 find_hw_thread_mask(uint hw_thread_no,cpumask_var_t hw_thread_mask,struct hfi1_affinity_node_list * affinity) find_hw_thread_mask() argument
983 struct hfi1_affinity_node_list *affinity = &node_affinity; hfi1_get_proc_affinity() local
1159 struct hfi1_affinity_node_list *affinity = &node_affinity; hfi1_put_proc_affinity() local
[all...]
/linux/arch/arm64/kernel/
H A Dsetup.c113 u32 i, affinity, fs[4], bits[4], ls; in smp_build_mpidr_hash() local
127 affinity = MPIDR_AFFINITY_LEVEL(mask, i); in smp_build_mpidr_hash()
133 ls = fls(affinity); in smp_build_mpidr_hash()
134 fs[i] = affinity ? ffs(affinity) - 1 : 0; in smp_build_mpidr_hash()
/linux/Documentation/core-api/irq/
H A Dirq-affinity.rst2 SMP IRQ affinity
14 IRQ affinity then the value will not change from the default of all CPUs.
16 /proc/irq/default_smp_affinity specifies default affinity mask that applies
17 to all non-active IRQs. Once IRQ is allocated/activated its affinity bitmask
/linux/Documentation/translations/zh_CN/core-api/irq/
H A Dirq-affinity.rst3 :Original: Documentation/core-api/irq/irq-affinity.rst
9 .. _cn_irq-affinity.rst:
23 (IRQ affinity),那么所有cpu的默认值将保持不变(即关联到所有CPU).
/linux/arch/alpha/kernel/
H A Dsys_dp264.c144 cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity) in cpu_set_irq_affinity() argument
150 if (cpumask_test_cpu(cpu, &affinity)) in cpu_set_irq_affinity()
159 dp264_set_affinity(struct irq_data *d, const struct cpumask *affinity, in dp264_set_affinity() argument
165 cpu_set_irq_affinity(d->irq, *affinity); in dp264_set_affinity()
173 clipper_set_affinity(struct irq_data *d, const struct cpumask *affinity, in clipper_set_affinity() argument
179 cpu_set_irq_affinity(d->irq - 16, *affinity); in clipper_set_affinity()
H A Dsys_titan.c135 titan_cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity) in titan_cpu_set_irq_affinity() argument
140 if (cpumask_test_cpu(cpu, &affinity)) in titan_cpu_set_irq_affinity()
149 titan_set_irq_affinity(struct irq_data *d, const struct cpumask *affinity, in titan_set_irq_affinity() argument
154 titan_cpu_set_irq_affinity(irq - 16, *affinity); in titan_set_irq_affinity()
/linux/drivers/perf/
H A Darm_pmu.c29 static int armpmu_count_irq_users(const struct cpumask *affinity,
587 static int armpmu_count_irq_users(const struct cpumask *affinity, const int irq) in armpmu_count_irq_users() argument
591 for_each_cpu(cpu, affinity) { in armpmu_count_irq_users()
600 armpmu_find_irq_ops(const struct cpumask *affinity, int irq) in armpmu_find_irq_ops() argument
605 for_each_cpu(cpu, affinity) { in armpmu_find_irq_ops()
634 const struct cpumask *affinity = *armpmu ? &(*armpmu)->supported_cpus : in armpmu_request_irq() local
668 } else if (armpmu_count_irq_users(affinity, irq) == 0) { in armpmu_request_irq()
669 err = request_percpu_nmi(irq, handler, "arm-pmu", affinity, pcpu_armpmu); in armpmu_request_irq()
674 affinity, pcpu_armpmu); in armpmu_request_irq()
682 irq_ops = armpmu_find_irq_ops(affinity, irq); in armpmu_request_irq()
/linux/drivers/irqchip/
H A Dirq-bcm7038-l1.c47 u8 affinity[MAX_WORDS * IRQS_PER_WORD]; member
173 __bcm7038_l1_unmask(d, intc->affinity[d->hwirq]); in bcm7038_l1_unmask()
183 __bcm7038_l1_mask(d, intc->affinity[d->hwirq]); in bcm7038_l1_mask()
202 was_disabled = !!(intc->cpus[intc->affinity[hw]]->mask_cache[word] & in bcm7038_l1_set_affinity()
204 __bcm7038_l1_mask(d, intc->affinity[hw]); in bcm7038_l1_set_affinity()
205 intc->affinity[hw] = first_cpu; in bcm7038_l1_set_affinity()
/linux/tools/perf/
H A Dbuiltin-record.c102 struct mmap_cpu_mask affinity;
1296 if (opts->affinity != PERF_AFFINITY_SYS) in record__mmap_evlist()
1302 opts->nr_cblocks, opts->affinity, in record__mmap_evlist()
1583 if (map->core.cpu.cpu >= 0 && rec->opts.affinity != PERF_AFFINITY_SYS && in record__adjust_affinity()
1584 !bitmap_equal(thread->mask->affinity.bits, map->affinity_mask.bits, in record__adjust_affinity()
1585 thread->mask->affinity.nbits)) { in record__adjust_affinity()
1586 bitmap_zero(thread->mask->affinity.bits, thread->mask->affinity.nbits); in record__adjust_affinity()
1587 bitmap_or(thread->mask->affinity.bits, thread->mask->affinity in record__adjust_affinity()
100 struct mmap_cpu_mask affinity; global() member
[all...]
/linux/Documentation/core-api/
H A Dworkqueue.rst379 An unbound workqueue groups CPUs according to its affinity scope to improve
380 cache locality. For example, if a workqueue is using the default affinity
387 Workqueue currently supports the following affinity scopes.
411 This is the default affinity scope.
420 The default affinity scope can be changed with the module parameter
421 ``workqueue.default_affinity_scope`` and a specific workqueue's affinity
424 If ``WQ_SYSFS`` is set, the workqueue will have the following affinity scope
429 Read to see the current affinity scope. Write to change.
435 0 by default indicating that affinity scopes are not strict. When a work
437 that the worker is inside its affinity scope, which is called
[all …]
/linux/drivers/resctrl/
H A Dmpam_devices.c637 cpumask_t *affinity) in mpam_get_cpumask_from_cache_id() argument
639 return acpi_pptt_get_cpumask_from_cache_id(cache_id, affinity); in mpam_get_cpumask_from_cache_id()
646 static void get_cpumask_from_node_id(u32 node_id, cpumask_t *affinity) in get_cpumask_from_node_id() argument
652 cpumask_set_cpu(cpu, affinity); in get_cpumask_from_node_id()
656 static int mpam_ris_get_affinity(struct mpam_msc *msc, cpumask_t *affinity, in mpam_ris_get_affinity() argument
666 affinity); in mpam_ris_get_affinity()
669 "Failed to determine CPU affinity\n"); in mpam_ris_get_affinity()
673 if (cpumask_empty(affinity)) in mpam_ris_get_affinity()
678 get_cpumask_from_node_id(comp->comp_id, affinity); in mpam_ris_get_affinity()
679 /* affinity ma in mpam_ris_get_affinity()
[all...]
H A Dmpam_resctrl.c838 if (cpumask_empty(&victim_iter->affinity)) { in topology_matches_l3()
844 cpu = cpumask_any_and(&victim_iter->affinity, cpu_online_mask); in topology_matches_l3()
857 if (!cpumask_equal(tmp_cpumask, &victim_iter->affinity)) { in topology_matches_l3()
862 cpumask_pr_args(&victim_iter->affinity)); in topology_matches_l3()
902 cpu = cpumask_any_and(&class->affinity, cpu_online_mask); in traffic_matches_l3()
961 if (!cpumask_equal(&class->affinity, cpu_possible_mask)) { in mpam_resctrl_pick_caches()
963 cpumask_pr_args(&class->affinity), in mpam_resctrl_pick_caches()
999 if (!cpumask_equal(&class->affinity, cpu_possible_mask)) { in mpam_resctrl_pick_mba()
1114 if (!cpumask_equal(&class->affinity, cpu_possible_mask)) { in mpam_resctrl_pick_counters()
1616 if (cpumask_test_cpu(cpu, &comp->affinity)) in find_component()
[all …]
H A Dmpam_internal.h343 cpumask_t affinity; member
377 cpumask_t affinity; member
418 cpumask_t affinity; member
523 cpumask_t *affinity);
/linux/tools/testing/selftests/bpf/
H A Dbench.c19 .affinity = false,
266 { "affinity", 'a', NULL, 0, "Set consumer/producer thread affinity"},
269 { "prod-affinity", ARG_PROD_AFFINITY_SET, "CPUSET", 0,
270 "Set of CPUs for producer threads; implies --affinity"},
271 { "cons-affinity", ARG_CONS_AFFINITY_SET, "CPUSET", 0,
272 "Set of CPUs for consumer threads; implies --affinity"},
355 env.affinity = true; in parse_arg()
364 env.affinity = true; in parse_arg()
372 env.affinity in parse_arg()
[all...]
/linux/include/linux/
H A Dirqdomain.h59 const struct cpumask *affinity; member
375 const struct irq_affinity_desc *affinity);
482 const struct irq_affinity_desc *affinity);
610 const struct irq_affinity_desc *affinity);

1234567