Home
last modified time | relevance | path

Searched full:affinity (Results 1 – 25 of 453) sorted by relevance

12345678910>>...19

/linux/kernel/irq/
H A Dcpuhotplug.c19 /* For !GENERIC_IRQ_EFFECTIVE_AFF_MASK this looks at general affinity mask */
28 * which do not implement effective affinity, but the architecture has in irq_needs_fixup()
29 * enabled the config switch. Use the general affinity mask instead. in irq_needs_fixup()
45 pr_warn("Eff. affinity %*pbl of IRQ %u contains only offline CPUs after offlining CPU %u\n", in irq_needs_fixup()
58 const struct cpumask *affinity; in migrate_one_irq() local
64 * still in the radix tree. Also if the chip has no affinity setter, in migrate_one_irq()
84 * - Affinity mask does not include this CPU. in migrate_one_irq()
100 * mask, so the last change of the affinity does not get lost. If in migrate_one_irq()
102 * any online CPU, use the current affinity mask. in migrate_one_irq()
105 affinity = irq_desc_get_pending_mask(desc); in migrate_one_irq()
[all …]
H A Dmanage.c154 * irq_can_set_affinity - Check if the affinity of a given irq can be set
164 * irq_can_set_affinity_usr - Check if affinity of a irq can be set from user space
179 * irq_set_thread_affinity - Notify irq threads to adjust affinity
180 * @desc: irq descriptor which has affinity changed
182 * Just set IRQTF_AFFINITY and delegate the affinity setting to the
211 pr_warn_once("irq_chip %s did not update eff. affinity mask of irq %u\n", in irq_validate_effective_affinity()
234 * it check whether the requested affinity mask intersects with in irq_do_set_affinity()
237 * the affinity setter from routing the interrupt to an isolated in irq_do_set_affinity()
246 * If all housekeeping CPUs in the affinity mask are offline, the in irq_do_set_affinity()
248 * housekeeping CPU which belongs to the affinity mask comes in irq_do_set_affinity()
[all …]
H A Daffinity.c19 * irq_create_affinity_masks - Create affinity masks for multiqueue spreading
21 * @affd: Description of the affinity requirements
63 /* Fill out vectors at the beginning that don't need affinity */ in irq_create_affinity_masks()
69 * have multiple sets, build each sets affinity mask separately. in irq_create_affinity_masks()
88 /* Fill out vectors at the end that don't need affinity */ in irq_create_affinity_masks()
107 * @affd: Description of the affinity requirements
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/lib/
H A Dcpu_rmap.c3 * 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 Dsrat.rst4 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/drivers/infiniband/hw/hfi1/
H A Daffinity.h37 /* 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 */
/linux/tools/virtio/ringtest/
H A Drun-on-all.sh19 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/tools/perf/util/
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 Devlist.h196 int affinity, int flush, int comp_level);
362 /** If present, used to set the affinity when switching between CPUs. */
363 struct affinity *affinity; member
367 * evlist__for_each_cpu - without affinity, iterate over the evlist. With
368 * affinity, iterate over all CPUs and then the evlist
370 * CPUs the affinity is set to the CPU to avoid IPIs
374 * @affinity: NULL or used to set the affinity to the current CPU.
376 #define evlist__for_each_cpu(evlist_cpu_itr, evlist, affinity) \ argument
377 for ((evlist_cpu_itr) = evlist__cpu_begin(evlist, affinity); \
382 struct evlist_cpu_iterator evlist__cpu_begin(struct evlist *evlist, struct affinity *affinity);
[all …]
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 Dmmap.c97 static int perf_mmap__aio_bind(struct mmap *map, int idx, struct perf_cpu cpu, int affinity) in perf_mmap__aio_bind() argument
105 if (affinity != PERF_AFFINITY_SYS && cpu__max_node() > 1) { in perf_mmap__aio_bind()
141 struct perf_cpu cpu __maybe_unused, int affinity __maybe_unused) in perf_mmap__aio_bind()
175 ret = perf_mmap__aio_bind(map, i, map->core.cpu, mp->affinity); in perf_mmap__aio_mmap()
268 if (mp->affinity == PERF_AFFINITY_NODE && cpu__max_node() > 1) in perf_mmap__setup_affinity_mask()
270 else if (mp->affinity == PERF_AFFINITY_CPU) in perf_mmap__setup_affinity_mask()
284 if (mp->affinity != PERF_AFFINITY_SYS && in mmap__mmap()
286 pr_debug2("failed to alloc mmap affinity mask, error %d\n", in mmap__mmap()
/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()
/linux/tools/power/cpupower/bench/
H A Dsystem.c67 * 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/include/linux/
H A Dcpu_rmap.h6 * 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/drivers/pci/msi/
H A Dapi.c138 * @affdesc: Optional pointer to an affinity descriptor structure. NULL otherwise
217 * * %PCI_IRQ_AFFINITY Auto-manage IRQs affinity by spreading
242 * vectors with affinity requirements
247 * @affd: affinity requirements (can be %NULL).
284 * Invoke the affinity spreading logic to ensure that in pci_alloc_irq_vectors_affinity()
324 * pci_irq_get_affinity() - Get a device interrupt vector affinity
333 * Return: MSI/MSI-X vector affinity, NULL if @nr is out of range or if
334 * the MSI(-X) vector was allocated without explicit affinity
353 /* MSI[X] interrupts can be allocated without affinity descriptor */ in pci_irq_get_affinity()
354 if (!desc->affinity) in pci_irq_get_affinity()
[all …]
/linux/drivers/md/
H A Ddm-ps-io-affinity.c12 #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()
239 .name = "io-affinity",
/linux/arch/mips/kernel/
H A Dmips-mt-fpaff.c21 * CPU mask used to set process affinity for MT VPEs/TCs with FPUs
31 * FPU affinity with the user's requested processor affinity.
64 * mipsmt_sys_sched_setaffinity - set the cpu affinity of a process
156 * mipsmt_sys_sched_getaffinity - get the cpu affinity of a process
215 printk(KERN_DEBUG "FPU Affinity set after %ld emulations\n", in mt_fp_affinity_init()
/linux/Documentation/driver-api/cxl/platform/example-configurations/
H A Dflexible.rst142 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 Dapple,aic.yaml21 - 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 Dsetup.c106 * 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 Dkfd_crat.h87 * 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/tools/testing/selftests/bpf/
H A Dbench.c19 .affinity = false,
266 { "affinity", 'a', NULL, 0, "Set consumer/producer thread affinity"},
268 { "prod-affinity", ARG_PROD_AFFINITY_SET, "CPUSET", 0,
269 "Set of CPUs for producer threads; implies --affinity"},
270 { "cons-affinity", ARG_CONS_AFFINITY_SET, "CPUSET", 0,
271 "Set of CPUs for consumer threads; implies --affinity"},
348 env.affinity = true; in parse_arg()
354 env.affinity = true; in parse_arg()
362 env.affinity in parse_arg()
[all...]
/linux/drivers/iommu/
H A Dhyperv-iommu.c46 /* Return error If new irq affinity is out of ioapic_max_cpumask. */ in hyperv_ir_set_affinity()
89 * Hypver-V IO APIC irq affinity should be in the scope of in hyperv_irq_remapping_alloc()
164 * max cpu affinity for IOAPIC irqs. Scan cpu 0-255 and set cpu in hyperv_prepare_irq_remapping()
198 const struct cpumask *affinity; in hyperv_root_ir_compose_msi_msg() local
205 affinity = irq_data_get_effective_affinity_mask(irq_data); in hyperv_root_ir_compose_msi_msg()
206 cpu = cpumask_first_and(affinity, cpu_online_mask); in hyperv_root_ir_compose_msi_msg()
/linux/tools/perf/
H A Dbuiltin-record.c100 struct mmap_cpu_mask affinity; member
1328 if (opts->affinity != PERF_AFFINITY_SYS) in record__mmap_evlist()
1334 opts->nr_cblocks, opts->affinity, in record__mmap_evlist()
1539 if (rec->opts.affinity != PERF_AFFINITY_SYS && in record__adjust_affinity()
1540 !bitmap_equal(thread->mask->affinity.bits, map->affinity_mask.bits, in record__adjust_affinity()
1541 thread->mask->affinity.nbits)) { in record__adjust_affinity()
1542 bitmap_zero(thread->mask->affinity.bits, thread->mask->affinity.nbits); in record__adjust_affinity()
1543 bitmap_or(thread->mask->affinity.bits, thread->mask->affinity.bits, in record__adjust_affinity()
1544 map->affinity_mask.bits, thread->mask->affinity.nbits); in record__adjust_affinity()
1545 sched_setaffinity(0, MMAP_CPU_MASK_BYTES(&thread->mask->affinity), in record__adjust_affinity()
[all …]

12345678910>>...19