| /kernel/linux/linux-5.10/kernel/irq/ |
| D | cpuhotplug.c | 1 // SPDX-License-Identifier: GPL-2.0 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() 47 cpumask_pr_args(m), d->irq, cpu); 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() 71 if (!chip || !chip->irq_set_affinity) { in migrate_one_irq() 72 pr_debug("IRQ %u: Unable to migrate away\n", d->irq); in migrate_one_irq() [all …]
|
| D | irqdesc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar 4 * Copyright (C) 2005-2006, Thomas Gleixner, Russell King 7 * information is available in Documentation/core-api/genericirq.rst 15 #include <linux/radix-tree.h> 23 * lockdep: we want to handle all irq_desc locks as a single lock-class: 57 if (!zalloc_cpumask_var_node(&desc->irq_common_data.affinity, in alloc_masks() 59 return -ENOMEM; in alloc_masks() 62 if (!zalloc_cpumask_var_node(&desc->irq_common_data.effective_affinity, in alloc_masks() 64 free_cpumask_var(desc->irq_common_data.affinity); in alloc_masks() [all …]
|
| D | msi.c | 1 // SPDX-License-Identifier: GPL-2.0 21 * alloc_msi_entry - Allocate an initialize msi_entry 24 * @affinity: Optional pointer to an affinity mask array size of @nvec 26 * If @affinity is not NULL then an affinity array[@nvec] is allocated 27 * and the affinity masks and flags from @affinity are copied. 30 const struct irq_affinity_desc *affinity) in alloc_msi_entry() argument 38 INIT_LIST_HEAD(&desc->list); in alloc_msi_entry() 39 desc->dev = dev; in alloc_msi_entry() 40 desc->nvec_used = nvec; in alloc_msi_entry() 41 if (affinity) { in alloc_msi_entry() [all …]
|
| /kernel/linux/linux-6.6/kernel/irq/ |
| D | cpuhotplug.c | 1 // SPDX-License-Identifier: GPL-2.0 19 /* 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() 46 cpumask_pr_args(m), d->irq, cpu); 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() 67 if (!chip || !chip->irq_set_affinity) { in migrate_one_irq() 68 pr_debug("IRQ %u: Unable to migrate away\n", d->irq); in migrate_one_irq() [all …]
|
| D | irqdesc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar 4 * Copyright (C) 2005-2006, Thomas Gleixner, Russell King 7 * information is available in Documentation/core-api/genericirq.rst 22 * lockdep: we want to handle all irq_desc locks as a single lock-class: 56 if (!zalloc_cpumask_var_node(&desc->irq_common_data.affinity, in alloc_masks() 58 return -ENOMEM; in alloc_masks() 61 if (!zalloc_cpumask_var_node(&desc->irq_common_data.effective_affinity, in alloc_masks() 63 free_cpumask_var(desc->irq_common_data.affinity); in alloc_masks() 64 return -ENOMEM; in alloc_masks() [all …]
|
| /kernel/linux/linux-6.6/Documentation/arch/arm64/ |
| D | asymmetric-32bit.rst | 2 Asymmetric 32-bit SoCs 7 This document describes the impact of asymmetric 32-bit SoCs on the 8 execution of 32-bit (``AArch32``) applications. 10 Date: 2021-05-17 16 of the CPUs are capable of executing 32-bit user applications. On such 19 ``execve(2)`` of 32-bit ELF binaries, with the latter returning 20 ``-ENOEXEC``. If the mismatch is detected during late onlining of a 21 64-bit-only CPU, then the onlining operation fails and the new CPU is 25 running legacy 32-bit binaries. Unsurprisingly, that doesn't work very 28 It seems inevitable that future SoCs will drop 32-bit support [all …]
|
| /kernel/linux/linux-6.6/lib/ |
| D | cpu_rmap.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * cpu_rmap.c: CPU affinity reverse-map support 13 * objects with CPU affinities. This can be seen as a reverse-map of 14 * CPU affinity. However, we do not assume that the object affinities 21 * alloc_cpu_rmap - allocate CPU affinity reverse-map 39 rmap = kzalloc(obj_offset + size * sizeof(rmap->obj[0]), flags); in alloc_cpu_rmap() 43 kref_init(&rmap->refcount); in alloc_cpu_rmap() 44 rmap->obj = (void **)((char *)rmap + obj_offset); in alloc_cpu_rmap() 50 * any newly-hotplugged CPUs to have some object assigned. in alloc_cpu_rmap() 53 rmap->near[cpu].index = cpu % size; in alloc_cpu_rmap() [all …]
|
| /kernel/linux/linux-5.10/lib/ |
| D | cpu_rmap.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * cpu_rmap.c: CPU affinity reverse-map support 13 * objects with CPU affinities. This can be seen as a reverse-map of 14 * CPU affinity. However, we do not assume that the object affinities 21 * alloc_cpu_rmap - allocate CPU affinity reverse-map 39 rmap = kzalloc(obj_offset + size * sizeof(rmap->obj[0]), flags); in alloc_cpu_rmap() 43 kref_init(&rmap->refcount); in alloc_cpu_rmap() 44 rmap->obj = (void **)((char *)rmap + obj_offset); in alloc_cpu_rmap() 50 * any newly-hotplugged CPUs to have some object assigned. in alloc_cpu_rmap() 53 rmap->near[cpu].index = cpu % size; in alloc_cpu_rmap() [all …]
|
| /kernel/linux/linux-6.6/tools/perf/util/ |
| D | affinity.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Manage affinity to optimize IPIs inside the kernel perf API. */ 10 #include "affinity.h" 14 int sz = cpu__max_cpu().cpu + 8 - 1; in get_cpu_set_size() 24 int affinity__setup(struct affinity *a) in affinity__setup() 28 a->orig_cpus = bitmap_zalloc(cpu_set_size * 8); in affinity__setup() 29 if (!a->orig_cpus) in affinity__setup() 30 return -1; in affinity__setup() 31 sched_getaffinity(0, cpu_set_size, (cpu_set_t *)a->orig_cpus); in affinity__setup() 32 a->sched_cpus = bitmap_zalloc(cpu_set_size * 8); in affinity__setup() [all …]
|
| D | affinity.h | 1 // SPDX-License-Identifier: GPL-2.0 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 | 2 # SPDX-License-Identifier: GPL-2.0 4 CPUS_ONLINE=$(lscpu --online -p=cpu|grep -v -e '#') 8 HOST_AFFINITY=$(echo "${CPUS_ONLINE}"|tail -n 1) 16 (echo "$@" | grep -e "--sleep" > /dev/null) || \ 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 | 2 # SPDX-License-Identifier: GPL-2.0 4 CPUS_ONLINE=$(lscpu --online -p=cpu|grep -v -e '#') 8 HOST_AFFINITY=$(echo "${CPUS_ONLINE}"|tail -n 1) 16 (echo "$@" | grep -e "--sleep" > /dev/null) || \ 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 | 1 /* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */ 3 * Copyright(c) 2015 - 2020 Intel Corporation. 35 /* Initialize non-HT cpu cores mask */ 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 | 1 // SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause 3 * Copyright(c) 2015 - 2020 Intel Corporation. 12 #include "affinity.h" 35 cpumask_clear(&set->mask); in init_cpu_mask_set() 36 cpumask_clear(&set->used); in init_cpu_mask_set() 37 set->gen = 0; in init_cpu_mask_set() 43 if (cpumask_equal(&set->mask, &set->used)) { in _cpu_mask_set_gen_inc() 48 set->gen++; in _cpu_mask_set_gen_inc() 49 cpumask_clear(&set->used); in _cpu_mask_set_gen_inc() 55 if (cpumask_empty(&set->used) && set->gen) { in _cpu_mask_set_gen_dec() [all …]
|
| /kernel/linux/linux-5.10/tools/perf/util/ |
| D | affinity.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Manage affinity to optimize IPIs inside the kernel perf API. */ 10 #include "affinity.h" 14 int sz = cpu__max_cpu() + 8 - 1; in get_cpu_set_size() 24 int affinity__setup(struct affinity *a) in affinity__setup() 28 a->orig_cpus = bitmap_alloc(cpu_set_size * 8); in affinity__setup() 29 if (!a->orig_cpus) in affinity__setup() 30 return -1; in affinity__setup() 31 sched_getaffinity(0, cpu_set_size, (cpu_set_t *)a->orig_cpus); in affinity__setup() 32 a->sched_cpus = bitmap_alloc(cpu_set_size * 8); in affinity__setup() [all …]
|
| D | affinity.h | 1 // SPDX-License-Identifier: GPL-2.0 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 | 1 // SPDX-License-Identifier: LGPL-2.1 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() 55 return -1; in main()
|
| /kernel/linux/linux-6.6/tools/testing/selftests/rseq/ |
| D | basic_test.c | 1 // SPDX-License-Identifier: LGPL-2.1 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() 59 return -1; in main()
|
| /kernel/linux/linux-5.10/drivers/infiniband/hw/hfi1/ |
| D | affinity.c | 2 * Copyright(c) 2015 - 2020 Intel Corporation. 24 * - Redistributions of source code must retain the above copyright 26 * - Redistributions in binary form must reproduce the above copyright 30 * - Neither the name of Intel Corporation nor the names of its 54 #include "affinity.h" 77 cpumask_clear(&set->mask); in init_cpu_mask_set() 78 cpumask_clear(&set->used); in init_cpu_mask_set() 79 set->gen = 0; in init_cpu_mask_set() 85 if (cpumask_equal(&set->mask, &set->used)) { in _cpu_mask_set_gen_inc() 90 set->gen++; in _cpu_mask_set_gen_inc() [all …]
|
| D | affinity.h | 2 * Copyright(c) 2015 - 2020 Intel Corporation. 24 * - Redistributions of source code must retain the above copyright 26 * - Redistributions in binary form must reproduce the above copyright 30 * - Neither the name of Intel Corporation nor the names of its 76 /* Initialize non-HT cpu cores mask */ 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 [all …]
|
| /kernel/linux/linux-5.10/tools/power/cpupower/bench/ |
| D | system.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* cpufreq-bench CPUFreq microbenchmark 43 * @retval -1 when failed 54 return -1; in set_cpufreq_governor() 60 return -1; in set_cpufreq_governor() 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() [all …]
|
| /kernel/linux/linux-6.6/tools/power/cpupower/bench/ |
| D | system.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* cpufreq-bench CPUFreq microbenchmark 43 * @retval -1 when failed 54 return -1; in set_cpufreq_governor() 60 return -1; in set_cpufreq_governor() 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() [all …]
|
| /kernel/linux/linux-6.6/Documentation/core-api/ |
| D | workqueue.rst | 33 thread system-wide. A single MT wq needed to keep around the same 60 * Use per-CPU unified worker pools shared by all wq to provide 83 called worker-pools. 85 The cmwq design differentiates between the user-facing workqueues that 87 which manages worker-pools and processes the queued work items. 89 There are two worker-pools, one for normal work items and the other 91 worker-pools to serve work items queued on unbound workqueues - the 102 When a work item is queued to a workqueue, the target worker-pool is 104 and appended on the shared worklist of the worker-pool. For example, 106 be queued on the worklist of either normal or highpri worker-pool that [all …]
|
| /kernel/linux/linux-5.10/include/linux/ |
| D | cpu_rmap.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 6 * cpu_rmap.c: CPU affinity reverse-map support 16 * struct cpu_rmap - CPU affinity reverse-map 18 * @size: Number of objects to be reverse-mapped 22 * based on affinity masks 40 const struct cpumask *affinity); 44 return rmap->near[cpu].index; in cpu_rmap_lookup_index() 49 return rmap->obj[rmap->near[cpu].index]; in cpu_rmap_lookup_obj() 53 * alloc_irq_cpu_rmap - allocate CPU affinity reverse-map for IRQs
|
| /kernel/linux/linux-6.6/include/linux/ |
| D | cpu_rmap.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 6 * cpu_rmap.c: CPU affinity reverse-map support 16 * struct cpu_rmap - CPU affinity reverse-map 18 * @size: Number of objects to be reverse-mapped 21 * based on affinity masks 39 const struct cpumask *affinity); 43 return rmap->near[cpu].index; in cpu_rmap_lookup_index() 48 return rmap->obj[rmap->near[cpu].index]; in cpu_rmap_lookup_obj() 52 * alloc_irq_cpu_rmap - allocate CPU affinity reverse-map for IRQs
|