| /linux/lib/ |
| H A D | cpu_rmap.c | 3 * cpu_rmap.c: CPU affinity reverse-map support 14 * CPU affinity. However, we do not assume that the object affinities 21 * alloc_cpu_rmap - allocate CPU affinity reverse-map 162 * cpu_rmap_update - update CPU rmap following a change of object affinity 164 * @index: Index of object whose affinity changed 165 * @affinity: New CPU affinity of object 168 const struct cpumask *affinity) in cpu_rmap_update() argument 188 /* Set distance to 0 for all CPUs in the new affinity mask. in cpu_rmap_update() 191 for_each_cpu(cpu, affinity) { in cpu_rmap_update() 223 /* Glue between IRQ affinity notifiers and CPU rmaps */ [all …]
|
| /linux/Documentation/driver-api/cxl/platform/acpi/ |
| H A D | srat.rst | 4 SRAT - Static Resource Affinity Table 7 The System/Static Resource Affinity Table describes resource (CPU, Memory) 8 affinity to "Proximity Domains". This table is technically optional, but for 14 Affinity entries and CEDT CFMWS to determine what your platform actually 27 Memory Affinity 34 Subtable Type : 01 [Memory Affinity] 47 Generic Port Affinity 49 The Generic Port Affinity subtable provides an association between a proximity 58 Subtable Type : 06 [Generic Port Affinity]
|
| /linux/tools/virtio/ringtest/ |
| H A D | run-on-all.sh | 19 echo "GUEST AFFINITY $cpu" 20 "$@" --host-affinity $HOST_AFFINITY --guest-affinity $cpu 23 echo "NO GUEST AFFINITY" 24 "$@" --host-affinity $HOST_AFFINITY 25 echo "NO AFFINITY"
|
| /linux/drivers/infiniband/hw/hfi1/ |
| H A D | affinity.h | 37 /* Initialize driver affinity data */ 40 * Set IRQ affinity to a CPU. The function will determine the 41 * CPU and set the affinity to it. 46 * Remove the IRQ's CPU affinity. This function also updates 52 * Determine a CPU affinity for a user process, if the process does not 53 * have an affinity set yet. 77 struct mutex lock; /* protects affinity nodes */
|
| H A D | affinity.c | 12 #include "affinity.h" 136 * The real cpu mask is part of the affinity struct but it has to be in node_affinity_init() 378 hfi1_cdbg(AFFINITY, in _dev_comp_vect_mappings_destroy() 427 hfi1_cdbg(AFFINITY, in _dev_comp_vect_mappings_create() 503 "Number of kernel receive queues is too large for completion vector affinity to be effective\n"); in _dev_comp_vect_cpu_mask_init() 532 hfi1_cdbg(AFFINITY, 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 structur in hfi1_dev_affinity_init() 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/tools/perf/util/ |
| H A D | affinity.c | 2 /* 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 D | affinity.h | 8 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 D | evlist.h | 20 #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...] |
| H A D | mmap.c | 98 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()
|
| /linux/tools/testing/selftests/rseq/ |
| H A D | basic_test.c | 18 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 D | slice_test.c | 125 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/power/cpupower/bench/ |
| H A D | system.c | 67 * sets cpu affinity for the process 69 * @param cpu cpu# to which the affinity should be set 72 * @retval -1 when setting the affinity failed 82 dprintf("set affinity to cpu #%u\n", cpu); in set_cpu_affinity() 86 fprintf(stderr, "warning: unable to set cpu affinity\n"); in set_cpu_affinity() 146 * sets up the cpu affinity and scheduler priority 155 printf("set cpu affinity to cpu #%u\n", config->cpu); in prepare_system()
|
| /linux/Documentation/core-api/ |
| H A D | workqueue.rst | 376 Affinity Scopes 379 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 [all …]
|
| /linux/kernel/irq/ |
| H A D | manage.c | 167 * 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 D | irq_test.c | 120 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/include/linux/ |
| H A D | cpu_rmap.h | 6 * cpu_rmap.c: CPU affinity reverse-map support 16 * struct cpu_rmap - CPU affinity reverse-map 21 * based on affinity masks 40 const struct cpumask *affinity); 53 * alloc_irq_cpu_rmap - allocate CPU affinity reverse-map for IRQs
|
| /linux/tools/testing/selftests/cgroup/ |
| H A D | test_cpuset.c | 312 * Test that disabling cpuset controller properly updates thread affinity. 315 * don't get their affinity updated when the cpuset controller is disabled. 324 * Expected: thread_b's affinity should expand from {1} to {0-1} 325 * Buggy: thread_b's affinity remains {1} 365 * Set CPU affinity constraints in test_cpuset_affinity_on_controller_disable() 416 ksft_print_msg("FAIL: thread_a initial affinity incorrect\n"); in test_cpuset_affinity_on_controller_disable() 421 ksft_print_msg("FAIL: thread_b initial affinity incorrect\n"); in test_cpuset_affinity_on_controller_disable() 425 /* Disable cpuset controller - this should trigger affinity update */ in test_cpuset_affinity_on_controller_disable() 429 /* Signal threads to save their final affinity and exit */ in test_cpuset_affinity_on_controller_disable() 440 ksft_print_msg("FAIL: thread_a final affinity incorrect\n"); in test_cpuset_affinity_on_controller_disable() [all …]
|
| /linux/drivers/md/ |
| H A D | dm-ps-io-affinity.c | 12 #define DM_MSG_PREFIX "multipath io-affinity" 52 *error = "io-affinity ps: invalid number of arguments"; in ioa_add_path() 58 *error = "io-affinity ps: Error allocating path context"; in ioa_add_path() 67 *error = "io-affinity ps: Error allocating cpumask context"; in ioa_add_path() 74 *error = "io-affinity ps: invalid cpumask"; in ioa_add_path() 97 *error = "io-affinity ps: No new/valid CPU mapping found"; in ioa_add_path() 238 .name = "io-affinity",
|
| /linux/Documentation/driver-api/cxl/platform/example-configurations/ |
| H A D | flexible.rst | 142 Subtable Type : 01 [Memory Affinity] 154 Subtable Type : 01 [Memory Affinity] 166 Subtable Type : 01 [Memory Affinity] 178 Subtable Type : 01 [Memory Affinity] 190 Subtable Type : 01 [Memory Affinity] 202 Subtable Type : 01 [Memory Affinity] 214 Subtable Type : 01 [Memory Affinity]
|
| /linux/Documentation/devicetree/bindings/interrupt-controller/ |
| H A D | apple,aic.yaml | 21 - Per-IRQ affinity setting 89 FIQ affinity can be expressed as a single "affinities" node, 91 affinity. 93 "^.+-affinity$": 100 the affinity is not the default.
|
| /linux/arch/arm64/kernel/ |
| H A D | setup.c | 106 * smp_build_mpidr_hash - Pre-compute shifts required at each affinity 113 u32 i, affinity, fs[4], bits[4], ls; in smp_build_mpidr_hash() local 117 * not contribute to affinity levels, ie they never toggle. in smp_build_mpidr_hash() 123 * Find and stash the last and first bit set at all affinity levels to in smp_build_mpidr_hash() 127 affinity = MPIDR_AFFINITY_LEVEL(mask, i); in smp_build_mpidr_hash() 131 * to express the affinity level. 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() 139 * significant bits at each affinity level and by shifting in smp_build_mpidr_hash()
|
| /linux/drivers/gpu/drm/amd/amdkfd/ |
| H A D | kfd_crat.h | 87 * ComputeUnit Affinity structure and definitions 122 * HSA Memory Affinity structure and definitions 147 * HSA Cache Affinity structure and definitions 176 * HSA TLB Affinity structure and definitions 211 * HSA CCompute/APU Affinity structure and definitions 230 * HSA IO Link Affinity structure and definitions
|
| /linux/Documentation/core-api/irq/ |
| H A D | irq-affinity.rst | 2 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/kernel/ |
| H A D | kthread.c | 353 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/tools/testing/selftests/bpf/ |
| H A D | bench.c | 19 .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...] |