Home
last modified time | relevance | path

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

12345678910>>...15

/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/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/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 */
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()
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 structure and initialize it. in hfi1_dev_affinity_init()
[all …]
/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 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 Devlist.h13 #include "affinity.h"
200 int affinity, int flush, int comp_level);
366 /** If present, used to set the affinity when switching between CPUs. */
367 struct affinity *affinity; member
368 /** Maybe be used to hold affinity state prior to iterating. */
369 struct affinity saved_affinity;
373 * evlist__for_each_cpu - without affinity, iterate over the evlist. With
374 * affinity, iterate over all CPUs and then the evlist
376 * CPUs the affinity i
[all...]
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 (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 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/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/Documentation/core-api/
H A Dworkqueue.rst376 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 Dmanage.c166 * irq_can_set_affinity - Check if the affinity of a given irq can be set
177 * irq_can_set_affinity_usr - Check if affinity of a irq can be set from user space
192 * irq_set_thread_affinity - Notify irq threads to adjust affinity
193 * @desc: irq descriptor which has affinity changed
195 * Just set IRQTF_AFFINITY and delegate the affinity setting to the
224 pr_warn_once("irq_chip %s did not update eff. affinity mask of irq %u\n", in irq_validate_effective_affinity()
246 * it check whether the requested affinity mask intersects with in irq_do_set_affinity()
249 * the affinity setter from routing the interrupt to an isolated in irq_do_set_affinity()
258 * If all housekeeping CPUs in the affinity mask are offline, the in irq_do_set_affinity()
260 * housekeeping CPU which belongs to the affinity mask comes in irq_do_set_affinity()
[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/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()
238 .name = "io-affinity",
/linux/tools/testing/selftests/cgroup/
H A Dtest_cpuset.c312 * 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/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/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/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()
H A Dsleep.S14 * @rs0: register containing affinity level 0 bit shift
15 * @rs1: register containing affinity level 1 bit shift
16 * @rs2: register containing affinity level 2 bit shift
17 * @rs3: register containing affinity level 3 bit shift
/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"},
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"},
353 env.affinity = true; in parse_arg()
362 env.affinity = true; in parse_arg()
370 env.affinity = true; in parse_arg()
469 fprintf(stderr, "setting affinity to CPU #%d failed: %d\n", in set_thread_affinity()
[all …]
/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).

12345678910>>...15