Home
last modified time | relevance | path

Searched refs:cpu_set (Results 1 – 18 of 18) sorted by relevance

/linux-6.1.9/tools/testing/selftests/kvm/
Dhardware_disable_test.c71 static inline void check_set_affinity(pthread_t thread, cpu_set_t *cpu_set) in check_set_affinity() argument
75 r = pthread_setaffinity_np(thread, sizeof(cpu_set_t), cpu_set); in check_set_affinity()
91 cpu_set_t cpu_set; in run_test() local
97 CPU_ZERO(&cpu_set); in run_test()
99 CPU_SET(i, &cpu_set); in run_test()
108 check_set_affinity(threads[i], &cpu_set); in run_test()
113 check_set_affinity(throw_away, &cpu_set); in run_test()
/linux-6.1.9/tools/perf/tests/
Dopenat-syscall-all-cpus.c30 cpu_set_t cpu_set; in test__openat_syscall_event_on_all_cpus() local
46 CPU_ZERO(&cpu_set); in test__openat_syscall_event_on_all_cpus()
77 CPU_SET(cpu.cpu, &cpu_set); in test__openat_syscall_event_on_all_cpus()
78 if (sched_setaffinity(0, sizeof(cpu_set), &cpu_set) < 0) { in test__openat_syscall_event_on_all_cpus()
88 CPU_CLR(cpu.cpu, &cpu_set); in test__openat_syscall_event_on_all_cpus()
Dmmap-basic.c37 cpu_set_t cpu_set; in test__basic_mmap() local
59 CPU_ZERO(&cpu_set); in test__basic_mmap()
60 CPU_SET(perf_cpu_map__cpu(cpus, 0).cpu, &cpu_set); in test__basic_mmap()
61 sched_setaffinity(0, sizeof(cpu_set), &cpu_set); in test__basic_mmap()
62 if (sched_setaffinity(0, sizeof(cpu_set), &cpu_set) < 0) { in test__basic_mmap()
/linux-6.1.9/tools/testing/selftests/bpf/prog_tests/
Dperf_event_stackmap.c71 cpu_set_t cpu_set; in test_perf_event_stackmap() local
83 CPU_ZERO(&cpu_set); in test_perf_event_stackmap()
84 CPU_SET(0, &cpu_set); in test_perf_event_stackmap()
85 err = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set), &cpu_set); in test_perf_event_stackmap()
Dperf_link.c12 cpu_set_t cpu_set; in burn_cpu() local
16 CPU_ZERO(&cpu_set); in burn_cpu()
17 CPU_SET(0, &cpu_set); in burn_cpu()
18 err = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set), &cpu_set); in burn_cpu()
Dget_stack_raw_tp.c97 cpu_set_t cpu_set; in test_get_stack_raw_tp() local
119 CPU_ZERO(&cpu_set); in test_get_stack_raw_tp()
120 CPU_SET(0, &cpu_set); in test_get_stack_raw_tp()
121 err = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set), &cpu_set); in test_get_stack_raw_tp()
Dperf_branches.c68 cpu_set_t cpu_set; in test_perf_branches_common() local
81 CPU_ZERO(&cpu_set); in test_perf_branches_common()
82 CPU_SET(0, &cpu_set); in test_perf_branches_common()
83 err = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set), &cpu_set); in test_perf_branches_common()
Dperf_buffer.c31 cpu_set_t cpu_set; in trigger_on_cpu() local
34 CPU_ZERO(&cpu_set); in trigger_on_cpu()
35 CPU_SET(cpu, &cpu_set); in trigger_on_cpu()
37 err = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set), &cpu_set); in trigger_on_cpu()
Dbpf_cookie.c351 cpu_set_t cpu_set; in burn_cpu() local
355 CPU_ZERO(&cpu_set); in burn_cpu()
356 CPU_SET(0, &cpu_set); in burn_cpu()
357 err = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set), &cpu_set); in burn_cpu()
/linux-6.1.9/tools/testing/selftests/mqueue/
Dmq_perf_tests.c83 cpu_set_t *cpu_set; variable
184 CPU_FREE(cpu_set); in shutdown()
564 cpu_set = CPU_ALLOC(cpus_online); in main()
565 if (cpu_set == NULL) { in main()
570 CPU_ZERO_S(cpu_set_size, cpu_set); in main()
598 cpu_set)) { in main()
604 cpu_set_size, cpu_set); in main()
728 CPU_ZERO_S(cpu_set_size, cpu_set); in main()
729 CPU_SET_S(cpus_to_pin[i], cpu_set_size, cpu_set); in main()
732 cpu_set); in main()
[all …]
/linux-6.1.9/tools/testing/selftests/net/
Dreuseport_bpf_cpu.c99 cpu_set_t cpu_set; in send_from_cpu() local
129 memset(&cpu_set, 0, sizeof(cpu_set)); in send_from_cpu()
130 CPU_SET(cpu_id, &cpu_set); in send_from_cpu()
131 if (sched_setaffinity(0, sizeof(cpu_set), &cpu_set) < 0) in send_from_cpu()
/linux-6.1.9/tools/testing/selftests/bpf/
Dbench.h14 struct cpu_set { struct
29 struct cpu_set prod_cpus; argument
30 struct cpu_set cons_cpus;
Dbench.c428 static int next_cpu(struct cpu_set *cpu_set) in next_cpu() argument
430 if (cpu_set->cpus) { in next_cpu()
434 for (i = cpu_set->next_cpu; i < cpu_set->cpus_len; i++) { in next_cpu()
435 if (cpu_set->cpus[i]) { in next_cpu()
436 cpu_set->next_cpu = i + 1; in next_cpu()
444 return cpu_set->next_cpu++; in next_cpu()
/linux-6.1.9/tools/virtio/
Dvringh_test.c145 cpu_set_t cpu_set; in parallel_test() local
167 CPU_ZERO(&cpu_set); in parallel_test()
191 CPU_SET(first_cpu, &cpu_set); in parallel_test()
192 if (sched_setaffinity(getpid(), sizeof(cpu_set), &cpu_set)) in parallel_test()
315 CPU_SET(first_cpu, &cpu_set); in parallel_test()
316 if (sched_setaffinity(getpid(), sizeof(cpu_set), &cpu_set)) in parallel_test()
/linux-6.1.9/tools/power/x86/intel-speed-select/
Disst.h189 extern size_t alloc_cpu_set(cpu_set_t **cpu_set);
190 extern void free_cpu_set(cpu_set_t *cpu_set);
Disst-config.c566 size_t alloc_cpu_set(cpu_set_t **cpu_set) in alloc_cpu_set() argument
577 *cpu_set = _cpu_set; in alloc_cpu_set()
581 void free_cpu_set(cpu_set_t *cpu_set) in free_cpu_set() argument
583 CPU_FREE(cpu_set); in free_cpu_set()
/linux-6.1.9/drivers/gpu/drm/i915/gem/selftests/
Di915_gem_coherency.c23 static int cpu_set(struct context *ctx, unsigned long offset, u32 v) in cpu_set() function
285 { "cpu", cpu_set, cpu_get, always_valid },
/linux-6.1.9/tools/power/x86/x86_energy_perf_policy/
Dx86_energy_perf_policy.c1306 void for_all_cpus_in_set(size_t set_size, cpu_set_t *cpu_set, int (func)(int)) in for_all_cpus_in_set() argument
1311 if (CPU_ISSET_S(cpu_num, set_size, cpu_set)) in for_all_cpus_in_set()