| /kernel/linux/linux-6.6/kernel/irq/ |
| D | cpuhotplug.c | 20 /* For !GENERIC_IRQ_EFFECTIVE_AFF_MASK this looks at general affinity mask */ 29 * which do not implement effective affinity, but the architecture has in irq_needs_fixup() 30 * enabled the config switch. Use the general affinity mask instead. in irq_needs_fixup() 46 pr_warn("Eff. affinity %*pbl of IRQ %u contains only offline CPUs after offlining CPU %u\n", in irq_needs_fixup() 59 const struct cpumask *affinity; in migrate_one_irq() local 68 * still in the radix tree. Also if the chip has no affinity setter, in migrate_one_irq() 88 * - Affinity mask does not include this CPU. in migrate_one_irq() 104 * mask, so the last change of the affinity does not get lost. If in migrate_one_irq() 106 * any online CPU, use the current affinity mask. in migrate_one_irq() 109 affinity = irq_desc_get_pending_mask(desc); in migrate_one_irq() [all …]
|
| D | irqdesc.c | 56 if (!zalloc_cpumask_var_node(&desc->irq_common_data.affinity, in alloc_masks() 63 free_cpumask_var(desc->irq_common_data.affinity); in alloc_masks() 73 free_cpumask_var(desc->irq_common_data.affinity); in alloc_masks() 81 const struct cpumask *affinity) in desc_smp_init() argument 83 if (!affinity) in desc_smp_init() 84 affinity = irq_default_affinity; in desc_smp_init() 85 cpumask_copy(desc->irq_common_data.affinity, affinity); in desc_smp_init() 99 desc_smp_init(struct irq_desc *desc, int node, const struct cpumask *affinity) { } in desc_smp_init() argument 103 const struct cpumask *affinity, struct module *owner) in desc_set_defaults() argument 126 desc_smp_init(desc, node, affinity); in desc_set_defaults() [all …]
|
| /kernel/linux/linux-5.10/kernel/irq/ |
| D | cpuhotplug.c | 20 /* For !GENERIC_IRQ_EFFECTIVE_AFF_MASK this looks at general affinity mask */ 29 * which do not implement effective affinity, but the architecture has in irq_needs_fixup() 30 * enabled the config switch. Use the general affinity mask instead. in irq_needs_fixup() 46 pr_warn("Eff. affinity %*pbl of IRQ %u contains only offline CPUs after offlining CPU %u\n", in irq_needs_fixup() 59 const struct cpumask *affinity; in migrate_one_irq() local 68 * still in the radix tree. Also if the chip has no affinity setter, in migrate_one_irq() 80 * - Affinity mask does not include this CPU. in migrate_one_irq() 104 * mask, so the last change of the affinity does not get lost. If in migrate_one_irq() 106 * any online CPU, use the current affinity mask. in migrate_one_irq() 109 affinity = irq_desc_get_pending_mask(desc); in migrate_one_irq() [all …]
|
| D | irqdesc.c | 57 if (!zalloc_cpumask_var_node(&desc->irq_common_data.affinity, in alloc_masks() 64 free_cpumask_var(desc->irq_common_data.affinity); in alloc_masks() 74 free_cpumask_var(desc->irq_common_data.affinity); in alloc_masks() 82 const struct cpumask *affinity) in desc_smp_init() argument 84 if (!affinity) in desc_smp_init() 85 affinity = irq_default_affinity; in desc_smp_init() 86 cpumask_copy(desc->irq_common_data.affinity, affinity); in desc_smp_init() 100 desc_smp_init(struct irq_desc *desc, int node, const struct cpumask *affinity) { } in desc_smp_init() argument 104 const struct cpumask *affinity, struct module *owner) in desc_set_defaults() argument 127 desc_smp_init(desc, node, affinity); in desc_set_defaults() [all …]
|
| /kernel/linux/linux-6.6/Documentation/arch/arm64/ |
| D | asymmetric-32bit.rst | 51 CPU affinity. 68 On a homogeneous system, the CPU affinity of a task is preserved across 71 affinity mask contains 64-bit-only CPUs. In this situation, the kernel 72 determines the new affinity mask as follows: 74 1. If the 32-bit-capable subset of the affinity mask is not empty, 75 then the affinity is restricted to that subset and the old affinity 84 affinity of the task is then changed to match the 32-bit-capable 87 3. On failure (i.e. out of memory), the affinity is changed to the set 91 invalidate the affinity mask saved in (1) and attempt to restore the CPU 92 affinity of the task using the saved mask if it was previously valid. [all …]
|
| /kernel/linux/linux-6.6/lib/ |
| 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 …]
|
| /kernel/linux/linux-5.10/lib/ |
| 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 150 * cpu_rmap_update - update CPU rmap following a change of object affinity 152 * @index: Index of object whose affinity changed 153 * @affinity: New CPU affinity of object 156 const struct cpumask *affinity) in cpu_rmap_update() argument 176 /* Set distance to 0 for all CPUs in the new affinity mask. in cpu_rmap_update() 179 for_each_cpu(cpu, affinity) { in cpu_rmap_update() 211 /* Glue between IRQ affinity notifiers and CPU rmaps */ [all …]
|
| /kernel/linux/linux-6.6/tools/perf/util/ |
| D | affinity.c | 2 /* Manage affinity to optimize IPIs inside the kernel perf API. */ 10 #include "affinity.h" 24 int affinity__setup(struct affinity *a) in affinity__setup() 44 * It is more efficient to change perf's affinity to the target 48 void affinity__set(struct affinity *a, int cpu) in affinity__set() 63 * We ignore errors because affinity is just an optimization. in affinity__set() 71 static void __affinity__cleanup(struct affinity *a) in __affinity__cleanup() 81 void affinity__cleanup(struct affinity *a) in affinity__cleanup()
|
| D | affinity.h | 7 struct affinity { struct 13 void affinity__cleanup(struct affinity *a); argument 14 void affinity__set(struct affinity *a, int cpu); 15 int affinity__setup(struct affinity *a);
|
| /kernel/linux/linux-5.10/tools/virtio/ringtest/ |
| 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"
|
| /kernel/linux/linux-6.6/tools/virtio/ringtest/ |
| 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"
|
| /kernel/linux/linux-6.6/drivers/infiniband/hw/hfi1/ |
| 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 */
|
| D | affinity.c | 12 #include "affinity.h" 145 * The real cpu mask is part of the affinity struct but it has to be in node_affinity_init() 386 hfi1_cdbg(AFFINITY, in _dev_comp_vect_mappings_destroy() 436 hfi1_cdbg(AFFINITY, in _dev_comp_vect_mappings_create() 512 … "Number of kernel receive queues is too large for completion vector affinity to be effective\n"); in _dev_comp_vect_cpu_mask_init() 541 hfi1_cdbg(AFFINITY, in _dev_comp_vect_cpu_mask_init() 542 "[%s] Completion vector affinity CPU set(s) %*pbl", in _dev_comp_vect_cpu_mask_init() 581 * Interrupt affinity. 606 * If this is the first time this NUMA node's affinity is used, in hfi1_dev_affinity_init() 607 * create an entry in the global affinity structure and initialize it. in hfi1_dev_affinity_init() [all …]
|
| /kernel/linux/linux-5.10/tools/perf/util/ |
| D | affinity.c | 2 /* Manage affinity to optimize IPIs inside the kernel perf API. */ 10 #include "affinity.h" 24 int affinity__setup(struct affinity *a) in affinity__setup() 44 * It is more efficient to change perf's affinity to the target 48 void affinity__set(struct affinity *a, int cpu) in affinity__set() 57 * We ignore errors because affinity is just an optimization. in affinity__set() 65 void affinity__cleanup(struct affinity *a) in affinity__cleanup()
|
| D | affinity.h | 7 struct affinity { struct 13 void affinity__cleanup(struct affinity *a); argument 14 void affinity__set(struct affinity *a, int cpu); 15 int affinity__setup(struct affinity *a);
|
| /kernel/linux/linux-5.10/tools/testing/selftests/rseq/ |
| 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() 35 sched_setaffinity(0, sizeof(affinity), &affinity); in test_cpu_pointer()
|
| /kernel/linux/linux-6.6/tools/testing/selftests/rseq/ |
| 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()
|
| /kernel/linux/common_modules/tzdriver/core/ |
| D | Kconfig | 3 int "Default Cpu Affinity" 7 Default Cpu Affinity 17 bool "TA affinity" 21 TA Cpu Affinity bind range, consistent with CONFIG_MAX_NUM_NODES in TEE 24 int "TA affinity max support cpus"
|
| /kernel/linux/linux-5.10/drivers/infiniband/hw/hfi1/ |
| D | affinity.h | 78 /* Initialize driver affinity data */ 81 * Set IRQ affinity to a CPU. The function will determine the 82 * CPU and set the affinity to it. 87 * Remove the IRQ's CPU affinity. This function also updates 93 * Determine a CPU affinity for a user process, if the process does not 94 * have an affinity set yet. 118 struct mutex lock; /* protects affinity nodes */
|
| D | affinity.c | 54 #include "affinity.h" 187 * The real cpu mask is part of the affinity struct but it has to be in node_affinity_init() 430 hfi1_cdbg(AFFINITY, in _dev_comp_vect_mappings_destroy() 480 hfi1_cdbg(AFFINITY, in _dev_comp_vect_mappings_create() 556 … "Number of kernel receive queues is too large for completion vector affinity to be effective\n"); in _dev_comp_vect_cpu_mask_init() 585 hfi1_cdbg(AFFINITY, in _dev_comp_vect_cpu_mask_init() 586 "[%s] Completion vector affinity CPU set(s) %*pbl", in _dev_comp_vect_cpu_mask_init() 625 * Interrupt affinity. 650 * If this is the first time this NUMA node's affinity is used, in hfi1_dev_affinity_init() 651 * create an entry in the global affinity structure and initialize it. in hfi1_dev_affinity_init() [all …]
|
| /kernel/linux/linux-6.6/tools/power/cpupower/bench/ |
| 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()
|
| /kernel/linux/linux-5.10/tools/power/cpupower/bench/ |
| 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()
|
| /kernel/linux/linux-5.10/include/linux/ |
| D | cpu_rmap.h | 6 * cpu_rmap.c: CPU affinity reverse-map support 16 * struct cpu_rmap - CPU affinity reverse-map 22 * based on affinity masks 40 const struct cpumask *affinity); 53 * alloc_irq_cpu_rmap - allocate CPU affinity reverse-map for IRQs
|
| /kernel/linux/linux-6.6/include/linux/ |
| 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 39 const struct cpumask *affinity); 52 * alloc_irq_cpu_rmap - allocate CPU affinity reverse-map for IRQs
|
| /kernel/linux/linux-6.6/Documentation/core-api/ |
| D | workqueue.rst | 350 Affinity Scopes 353 An unbound workqueue groups CPUs according to its affinity scope to improve 354 cache locality. For example, if a workqueue is using the default affinity 361 Workqueue currently supports the following affinity scopes. 379 cases. This is the default affinity scope. 388 The default affinity scope can be changed with the module parameter 389 ``workqueue.default_affinity_scope`` and a specific workqueue's affinity 392 If ``WQ_SYSFS`` is set, the workqueue will have the following affinity scope 397 Read to see the current affinity scope. Write to change. 403 0 by default indicating that affinity scopes are not strict. When a work [all …]
|