/Linux-v5.4/tools/perf/lib/ |
D | cpumap.c | 15 struct perf_cpu_map *cpus = malloc(sizeof(*cpus) + sizeof(int)); in perf_cpu_map__dummy_new() local 17 if (cpus != NULL) { in perf_cpu_map__dummy_new() 18 cpus->nr = 1; in perf_cpu_map__dummy_new() 19 cpus->map[0] = -1; in perf_cpu_map__dummy_new() 20 refcount_set(&cpus->refcnt, 1); in perf_cpu_map__dummy_new() 23 return cpus; in perf_cpu_map__dummy_new() 50 struct perf_cpu_map *cpus; in cpu_map__default_new() local 57 cpus = malloc(sizeof(*cpus) + nr_cpus * sizeof(int)); in cpu_map__default_new() 58 if (cpus != NULL) { in cpu_map__default_new() 62 cpus->map[i] = i; in cpu_map__default_new() [all …]
|
D | evlist.c | 36 * We already have cpus for evsel (via PMU sysfs) so in __perf_evlist__propagate_maps() 40 perf_cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps() 41 evsel->cpus = perf_cpu_map__get(evlist->cpus); in __perf_evlist__propagate_maps() 42 } else if (evsel->cpus != evsel->own_cpus) { in __perf_evlist__propagate_maps() 43 perf_cpu_map__put(evsel->cpus); in __perf_evlist__propagate_maps() 44 evsel->cpus = perf_cpu_map__get(evsel->own_cpus); in __perf_evlist__propagate_maps() 110 struct perf_cpu_map *cpus, in perf_evlist__set_maps() argument 120 if (cpus != evlist->cpus) { in perf_evlist__set_maps() 121 perf_cpu_map__put(evlist->cpus); in perf_evlist__set_maps() 122 evlist->cpus = perf_cpu_map__get(cpus); in perf_evlist__set_maps() [all …]
|
/Linux-v5.4/drivers/cpuidle/ |
D | coupled.c | 3 * coupled.c - helper functions to enter the same idle state on multiple cpus 24 * cpus cannot be independently powered down, either due to 31 * shared between the cpus (L2 cache, interrupt controller, and 33 * be tightly controlled on both cpus. 36 * WFI state until all cpus are ready to enter a coupled state, at 38 * cpus at approximately the same time. 40 * Once all cpus are ready to enter idle, they are woken by an smp 42 * cpus will find work to do, and choose not to enter idle. A 43 * final pass is needed to guarantee that all cpus will call the 46 * ready counter matches the number of online coupled cpus. If any [all …]
|
/Linux-v5.4/Documentation/timers/ |
D | no_hz.rst | 19 2. Omit scheduling-clock ticks on idle CPUs (CONFIG_NO_HZ_IDLE=y or 23 3. Omit scheduling-clock ticks on CPUs that are either idle or that 65 Omit Scheduling-Clock Ticks For Idle CPUs 74 scheduling-clock interrupts to idle CPUs, which is critically important 82 idle CPUs. That said, dyntick-idle mode is not free: 104 Omit Scheduling-Clock Ticks For CPUs With Only One Runnable Task 109 Note that omitting scheduling-clock ticks for CPUs with only one runnable 110 task implies also omitting them for idle CPUs. 113 sending scheduling-clock interrupts to CPUs with a single runnable task, 114 and such CPUs are said to be "adaptive-ticks CPUs". This is important [all …]
|
/Linux-v5.4/Documentation/admin-guide/cgroup-v1/ |
D | cpusets.rst | 29 2.2 Adding/removing cpus 41 Cpusets provide a mechanism for assigning a set of CPUs and Memory 55 include CPUs in its CPU affinity mask, and using the mbind(2) and 58 CPUs or Memory Nodes not in that cpuset. The scheduler will not 65 cpusets and which CPUs and Memory Nodes are assigned to each cpuset, 73 The management of large computer systems, with many processors (CPUs), 111 Cpusets provide a Linux kernel mechanism to constrain which CPUs and 115 CPUs a task may be scheduled (sched_setaffinity) and on which Memory 120 - Cpusets are sets of allowed CPUs and Memory Nodes, known to the 124 - Calls to sched_setaffinity are filtered to just those CPUs [all …]
|
/Linux-v5.4/tools/perf/tests/ |
D | openat-syscall-all-cpus.c | 26 struct perf_cpu_map *cpus; in test__openat_syscall_event_on_all_cpus() local 39 cpus = perf_cpu_map__new(NULL); in test__openat_syscall_event_on_all_cpus() 40 if (cpus == NULL) { in test__openat_syscall_event_on_all_cpus() 54 if (evsel__open(evsel, cpus, threads) < 0) { in test__openat_syscall_event_on_all_cpus() 61 for (cpu = 0; cpu < cpus->nr; ++cpu) { in test__openat_syscall_event_on_all_cpus() 66 * without CPU_ALLOC. 1024 cpus in 2010 still seems in test__openat_syscall_event_on_all_cpus() 69 if (cpus->map[cpu] >= CPU_SETSIZE) { in test__openat_syscall_event_on_all_cpus() 70 pr_debug("Ignoring CPU %d\n", cpus->map[cpu]); in test__openat_syscall_event_on_all_cpus() 74 CPU_SET(cpus->map[cpu], &cpu_set); in test__openat_syscall_event_on_all_cpus() 77 cpus->map[cpu], in test__openat_syscall_event_on_all_cpus() [all …]
|
D | cpumap.c | 54 struct cpu_map_entries *cpus; in process_event_cpus() local 62 cpus = (struct cpu_map_entries *)data->data; in process_event_cpus() 64 TEST_ASSERT_VAL("wrong nr", cpus->nr == 2); in process_event_cpus() 65 TEST_ASSERT_VAL("wrong cpu", cpus->cpu[0] == 1); in process_event_cpus() 66 TEST_ASSERT_VAL("wrong cpu", cpus->cpu[1] == 256); in process_event_cpus() 80 struct perf_cpu_map *cpus; in test__cpu_map_synthesize() local 83 cpus = perf_cpu_map__new("0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19"); in test__cpu_map_synthesize() 86 !perf_event__synthesize_cpu_map(NULL, cpus, process_event_mask, NULL)); in test__cpu_map_synthesize() 88 perf_cpu_map__put(cpus); in test__cpu_map_synthesize() 91 cpus = perf_cpu_map__new("1,256"); in test__cpu_map_synthesize() [all …]
|
/Linux-v5.4/include/linux/ |
D | stop_machine.h | 13 * function to be executed on a single or multiple cpus preempting all 14 * other processes and monopolizing those cpus until it finishes. 18 * cpus are online. 110 * stop_machine: freeze the machine on all CPUs and run this function 113 * @cpus: the cpus to run the @fn() on (NULL = any online cpu) 125 int stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus); 128 * stop_machine_cpuslocked: freeze the machine on all CPUs and run this function 131 * @cpus: the cpus to run the @fn() on (NULL = any online cpu) 136 int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus); 139 const struct cpumask *cpus); [all …]
|
/Linux-v5.4/Documentation/scheduler/ |
D | sched-energy.rst | 9 the impact of its decisions on the energy consumed by CPUs. EAS relies on an 10 Energy Model (EM) of the CPUs to select an energy efficient CPU for each task, 59 In short, EAS changes the way CFS tasks are assigned to CPUs. When it is time 64 knowledge about the platform's topology, which include the 'capacity' of CPUs, 72 differentiate CPUs with different computing throughput. The 'capacity' of a CPU 76 tasks and CPUs computed by the Per-Entity Load Tracking (PELT) mechanism. Thanks 79 energy trade-offs. The capacity of CPUs is provided via arch-specific code 99 Let us consider a platform with 12 CPUs, split in 3 performance domains 102 CPUs: 0 1 2 3 4 5 6 7 8 9 10 11 108 containing 6 CPUs. The two root domains are denoted rd1 and rd2 in the [all …]
|
/Linux-v5.4/drivers/clk/sunxi/ |
D | clk-sun9i-cpus.c | 7 * Allwinner A80 CPUS clock driver 22 * sun9i_a80_cpus_clk_setup() - Setup function for a80 cpus composite clk 55 struct sun9i_a80_cpus_clk *cpus = to_sun9i_a80_cpus_clk(hw); in sun9i_a80_cpus_clk_recalc_rate() local 60 reg = readl(cpus->reg); in sun9i_a80_cpus_clk_recalc_rate() 155 struct sun9i_a80_cpus_clk *cpus = to_sun9i_a80_cpus_clk(hw); in sun9i_a80_cpus_clk_set_rate() local 162 reg = readl(cpus->reg); in sun9i_a80_cpus_clk_set_rate() 170 writel(reg, cpus->reg); in sun9i_a80_cpus_clk_set_rate() 188 struct sun9i_a80_cpus_clk *cpus; in sun9i_a80_cpus_setup() local 193 cpus = kzalloc(sizeof(*cpus), GFP_KERNEL); in sun9i_a80_cpus_setup() 194 if (!cpus) in sun9i_a80_cpus_setup() [all …]
|
/Linux-v5.4/Documentation/admin-guide/ |
D | cputopology.rst | 41 internal kernel map of CPUs within the same core. 46 human-readable list of CPUs within the same core. 51 internal kernel map of the CPUs sharing the same physical_package_id. 56 human-readable list of CPUs sharing the same physical_package_id. 61 internal kernel map of CPUs within the same die. 65 human-readable list of CPUs within the same die. 137 offline: CPUs that are not online because they have been 139 of CPUs allowed by the kernel configuration (kernel_max 140 above). [~cpu_online_mask + cpus >= NR_CPUS] 142 online: CPUs that are online and being scheduled [cpu_online_mask] [all …]
|
D | kernel-per-CPU-kthreads.rst | 13 - Documentation/IRQ-affinity.txt: Binding interrupts to sets of CPUs. 15 - Documentation/admin-guide/cgroup-v1: Using cgroups to bind tasks to sets of CPUs. 18 of CPUs. 21 call to bind tasks to sets of CPUs. 50 2. Do all eHCA-Infiniband-related work on other CPUs, including 53 provisioned only on selected CPUs. 101 with multiple CPUs, force them all offline before bringing the 102 first one back online. Once you have onlined the CPUs in question, 103 do not offline any other CPUs, because doing so could force the 104 timer back onto one of the CPUs in question. [all …]
|
/Linux-v5.4/Documentation/devicetree/bindings/csky/ |
D | cpus.txt | 5 The device tree allows to describe the layout of CPUs in a system through 6 the "cpus" node, which in turn contains a number of subnodes (ie "cpu") 9 Only SMP system need to care about the cpus node and single processor 10 needn't define cpus node at all. 13 cpus and cpu node bindings definition 16 - cpus node 20 The node name must be "cpus". 22 A cpus node must define the following properties: 59 cpus {
|
/Linux-v5.4/Documentation/power/ |
D | suspend-and-cpuhotplug.rst | 27 |tasks | | cpus | | | | cpus | |tasks| 59 online CPUs 75 Note down these cpus in | P 100 | Call _cpu_up() [for all those cpus in the frozen_cpus mask, in a loop] 158 the non-boot CPUs are offlined or onlined, the _cpu_*() functions are called 176 update on the CPUs, as discussed below: 183 a. When all the CPUs are identical: 186 to apply the same microcode revision to each of the CPUs. 191 all CPUs, in order to handle case 'b' described below. 194 b. When some of the CPUs are different than the rest: [all …]
|
/Linux-v5.4/tools/perf/lib/Documentation/tutorial/ |
D | tutorial.rst | 48 how to create it and display its cpus: 67 5 struct perf_cpu_map *cpus; 70 8 cpus = perf_cpu_map__new(NULL); 72 10 perf_cpu_map__for_each_cpu(cpu, tmp, cpus) 77 15 perf_cpu_map__put(cpus); 91 The *NULL* argument asks it to populate the object with the current online CPUs list: 95 8 cpus = perf_cpu_map__new(NULL); 101 15 perf_cpu_map__put(cpus); 103 The iteration through the *struct perf_cpumap* CPUs is done using the *perf_cpu_map__for_each_cpu* 108 - cpus - the *struct perf_cpumap* object [all …]
|
/Linux-v5.4/kernel/ |
D | smp.c | 79 * CPUs might arrive late, either due to hardware latencies or in smpcfd_dying_cpu() 255 * better run first since some other CPUs may be busy waiting in flush_smp_call_function_queue() 265 * @wait: If true, wait until function has completed on other CPUs. 356 * smp_call_function_any - Run a function on any of the given cpus 357 * @mask: The mask of cpus it can run on. 362 * Returns 0 on success, else a negative status code (if no cpus were online). 399 * smp_call_function_many(): Run a function on a set of other CPUs. 400 * @mask: The set of cpus to run on (only runs on online subset). 404 * on other CPUs. 440 /* No online cpus? We're done. */ in smp_call_function_many() [all …]
|
D | stop_machine.c | 28 * be shared by works on different cpus. 36 /* the actual stopper, one per every possible cpu, enabled on online cpus */ 112 * partially or fully on different cpus. @fn should either be ready 232 * At this stage all other CPUs we depend on must spin in multi_cpu_stop() 307 * stop_two_cpus - stops two cpus 417 * stop_cpus - stop multiple cpus 418 * @cpumask: cpus to stop 422 * Execute @fn(@arg) on online cpus in @cpumask. On each target cpu, 427 * This function doesn't guarantee the cpus in @cpumask stay online 428 * till @fn completes. If some cpus go down in the middle, execution [all …]
|
/Linux-v5.4/tools/perf/util/ |
D | record.c | 67 struct perf_cpu_map *cpus; in perf_probe_api() local 70 cpus = perf_cpu_map__new(NULL); in perf_probe_api() 71 if (!cpus) in perf_probe_api() 73 cpu = cpus->map[0]; in perf_probe_api() 74 perf_cpu_map__put(cpus); in perf_probe_api() 122 struct perf_cpu_map *cpus; in perf_can_record_cpu_wide() local 125 cpus = perf_cpu_map__new(NULL); in perf_can_record_cpu_wide() 126 if (!cpus) in perf_can_record_cpu_wide() 128 cpu = cpus->map[0]; in perf_can_record_cpu_wide() 129 perf_cpu_map__put(cpus); in perf_can_record_cpu_wide() [all …]
|
D | cpumap.c | 21 static struct perf_cpu_map *cpu_map__from_entries(struct cpu_map_entries *cpus) in cpu_map__from_entries() argument 25 map = perf_cpu_map__empty_new(cpus->nr); in cpu_map__from_entries() 29 for (i = 0; i < cpus->nr; i++) { in cpu_map__from_entries() 35 if (cpus->cpu[i] == (u16) -1) in cpu_map__from_entries() 38 map->map[i] = (int) cpus->cpu[i]; in cpu_map__from_entries() 83 struct perf_cpu_map *cpus = malloc(sizeof(*cpus) + sizeof(int) * nr); in perf_cpu_map__empty_new() local 85 if (cpus != NULL) { in perf_cpu_map__empty_new() 88 cpus->nr = nr; in perf_cpu_map__empty_new() 90 cpus->map[i] = -1; in perf_cpu_map__empty_new() 92 refcount_set(&cpus->refcnt, 1); in perf_cpu_map__empty_new() [all …]
|
/Linux-v5.4/tools/perf/arch/arm64/util/ |
D | header.c | 22 struct perf_cpu_map *cpus; in get_cpuid_str() local 25 if (!sysfs || !pmu || !pmu->cpus) in get_cpuid_str() 32 /* read midr from list of cpus mapped to this pmu */ in get_cpuid_str() 33 cpus = perf_cpu_map__get(pmu->cpus); in get_cpuid_str() 34 for (cpu = 0; cpu < perf_cpu_map__nr(cpus); cpu++) { in get_cpuid_str() 36 sysfs, cpus->map[cpu]); in get_cpuid_str() 66 perf_cpu_map__put(cpus); in get_cpuid_str()
|
/Linux-v5.4/tools/testing/selftests/cpu-hotplug/ |
D | cpu-on-off-test.sh | 44 echo -e "\t Cpus in online state: $online_cpus" 52 echo -e "\t Cpus in offline state: $offline_cpus" 56 # list all hot-pluggable CPUs 172 echo -e "\t run with -a option to offline all cpus" 206 echo "Full scope test: all hotplug cpus" 207 echo -e "\t online all offline cpus" 208 echo -e "\t offline all online cpus" 209 echo -e "\t online all offline cpus" 213 # Online all hot-pluggable CPUs 220 # Offline all hot-pluggable CPUs [all …]
|
/Linux-v5.4/tools/perf/lib/tests/ |
D | test-cpumap.c | 15 struct perf_cpu_map *cpus; in main() local 21 cpus = perf_cpu_map__dummy_new(); in main() 22 if (!cpus) in main() 25 perf_cpu_map__get(cpus); in main() 26 perf_cpu_map__put(cpus); in main() 27 perf_cpu_map__put(cpus); in main()
|
/Linux-v5.4/Documentation/arm/ |
D | cluster-pm-race-avoidance.rst | 18 In a system containing multiple CPUs, it is desirable to have the 19 ability to turn off individual CPUs when the system is idle, reducing 22 In a system containing multiple clusters of CPUs, it is also desirable 27 of independently running CPUs, while the OS continues to run. This 92 CPUs in the cluster simultaneously modifying the state. The cluster- 104 referred to as a "CPU". CPUs are assumed to be single-threaded: 107 This means that CPUs fit the basic model closely. 216 A cluster is a group of connected CPUs with some common resources. 217 Because a cluster contains multiple CPUs, it can be doing multiple 272 which exact CPUs within the cluster play these roles. This must [all …]
|
/Linux-v5.4/tools/perf/arch/nds32/util/ |
D | header.c | 15 struct cpu_map *cpus; in get_cpuid_str() local 18 if (!sysfs || !pmu || !pmu->cpus) in get_cpuid_str() 25 cpus = cpu_map__get(pmu->cpus); in get_cpuid_str() 26 sprintf(buf, "0x%x", cpus->nr - 1); in get_cpuid_str() 27 cpu_map__put(cpus); in get_cpuid_str()
|
/Linux-v5.4/tools/testing/selftests/cpufreq/ |
D | cpu.sh | 17 cpus=$(ls $CPUROOT | grep "cpu[0-9].*") 18 for cpu in $cpus; do 25 cpus=$(ls $CPUROOT | grep "cpu[1-9].*") 26 for cpu in $cpus; do 52 # Reboot CPUs 67 # Prints warning for all CPUs with missing cpufreq directory 73 # Counts CPUs with cpufreq directories
|