Home
last modified time | relevance | path

Searched refs:cpuset (Results 1 – 25 of 36) sorted by relevance

12

/tools/testing/selftests/x86/
Dsysret_ss_attrs.c55 cpu_set_t cpuset; in main() local
56 CPU_ZERO(&cpuset); in main()
57 CPU_SET(0, &cpuset); in main()
58 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0) in main()
Dioperm.c90 cpu_set_t cpuset; in main() local
91 CPU_ZERO(&cpuset); in main()
92 CPU_SET(0, &cpuset); in main()
93 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0) in main()
Diopl.c174 cpu_set_t cpuset; in main() local
176 CPU_ZERO(&cpuset); in main()
177 CPU_SET(0, &cpuset); in main()
178 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0) in main()
Dldt_gdt.c437 cpu_set_t cpuset; in threadproc() local
438 CPU_ZERO(&cpuset); in threadproc()
439 CPU_SET(1, &cpuset); in threadproc()
440 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0) in threadproc()
532 cpu_set_t cpuset; in do_multicpu_tests() local
537 CPU_ZERO(&cpuset); in do_multicpu_tests()
538 CPU_SET(1, &cpuset); in do_multicpu_tests()
539 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0) { in do_multicpu_tests()
544 CPU_ZERO(&cpuset); in do_multicpu_tests()
545 CPU_SET(0, &cpuset); in do_multicpu_tests()
[all …]
/tools/testing/selftests/powerpc/tm/
Dtm-poison.c29 cpu_set_t cpuset; in tm_poison_test() local
42 CPU_ZERO(&cpuset); in tm_poison_test()
43 CPU_SET(cpu, &cpuset); in tm_poison_test()
44 FAIL_IF(sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0); in tm_poison_test()
Dtm-trap.c253 cpu_set_t cpuset; in tm_trap_test() local
274 CPU_ZERO(&cpuset); in tm_trap_test()
275 CPU_SET(cpu, &cpuset); in tm_trap_test()
287 rc = pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpuset); in tm_trap_test()
Dtm-unavailable.c344 cpu_set_t cpuset; in tm_unavailable_test() local
353 CPU_ZERO(&cpuset); in tm_unavailable_test()
354 CPU_SET(cpu, &cpuset); in tm_unavailable_test()
362 rc = pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpuset); in tm_unavailable_test()
/tools/testing/selftests/cgroup/
Dtest_cpuset_prs.sh63 echo +cpuset > cgroup.subtree_control
102 echo $EXPECTED_VAL > cpuset.cpus.partition
104 ACTUAL_VAL=$(cat cpuset.cpus.partition)
115 ACTUAL_VAL=$(cat cpuset.cpus.effective)
142 echo 2-3 > cpuset.cpus
143 TYPE=$(cat cpuset.cpus.partition)
144 [[ $TYPE = member ]] || echo member > cpuset.cpus.partition
168 echo +cpuset > cgroup.subtree_control
173 echo 2-3 > cpuset.cpus
187 echo 2 > cpuset.cpus
[all …]
/tools/testing/selftests/powerpc/benchmarks/
Dfork.c32 cpu_set_t cpuset; in set_cpu() local
37 CPU_ZERO(&cpuset); in set_cpu()
38 CPU_SET(cpu, &cpuset); in set_cpu()
40 if (sched_setaffinity(0, sizeof(cpuset), &cpuset)) { in set_cpu()
137 cpu_set_t cpuset; in bench_thread() local
149 CPU_ZERO(&cpuset); in bench_thread()
150 CPU_SET(cpu, &cpuset); in bench_thread()
152 rc = pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpuset); in bench_thread()
Dcontext_switch.c78 cpu_set_t cpuset; in start_thread_on() local
81 CPU_ZERO(&cpuset); in start_thread_on()
82 CPU_SET(cpu, &cpuset); in start_thread_on()
91 rc = pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpuset); in start_thread_on()
109 cpu_set_t *cpuset; in start_process_on() local
123 cpuset = CPU_ALLOC(ncpus); in start_process_on()
124 if (!cpuset) { in start_process_on()
128 CPU_ZERO_S(size, cpuset); in start_process_on()
129 CPU_SET_S(cpu, size, cpuset); in start_process_on()
131 if (sched_setaffinity(0, size, cpuset)) { in start_process_on()
[all …]
/tools/perf/bench/
Dfutex-wake.c100 cpu_set_t *cpuset; in block_threads() local
106 cpuset = CPU_ALLOC(nrcpus); in block_threads()
107 BUG_ON(!cpuset); in block_threads()
115 CPU_ZERO_S(size, cpuset); in block_threads()
116 CPU_SET_S(perf_cpu_map__cpu(cpu, i % perf_cpu_map__nr(cpu)).cpu, size, cpuset); in block_threads()
118 if (pthread_attr_setaffinity_np(&thread_attr, size, cpuset)) { in block_threads()
119 CPU_FREE(cpuset); in block_threads()
124 CPU_FREE(cpuset); in block_threads()
129 CPU_FREE(cpuset); in block_threads()
Dfutex-lock-pi.c123 cpu_set_t *cpuset; in create_threads() local
130 cpuset = CPU_ALLOC(nrcpus); in create_threads()
131 BUG_ON(!cpuset); in create_threads()
147 CPU_ZERO_S(size, cpuset); in create_threads()
148 CPU_SET_S(perf_cpu_map__cpu(cpu, i % perf_cpu_map__nr(cpu)).cpu, size, cpuset); in create_threads()
150 if (pthread_attr_setaffinity_np(&thread_attr, size, cpuset)) { in create_threads()
151 CPU_FREE(cpuset); in create_threads()
156 CPU_FREE(cpuset); in create_threads()
161 CPU_FREE(cpuset); in create_threads()
Dfutex-hash.c126 cpu_set_t *cpuset; in bench_futex_hash() local
178 cpuset = CPU_ALLOC(nrcpus); in bench_futex_hash()
179 BUG_ON(!cpuset); in bench_futex_hash()
188 CPU_ZERO_S(size, cpuset); in bench_futex_hash()
190 CPU_SET_S(perf_cpu_map__cpu(cpu, i % perf_cpu_map__nr(cpu)).cpu, size, cpuset); in bench_futex_hash()
191 ret = pthread_attr_setaffinity_np(&thread_attr, size, cpuset); in bench_futex_hash()
193 CPU_FREE(cpuset); in bench_futex_hash()
199 CPU_FREE(cpuset); in bench_futex_hash()
204 CPU_FREE(cpuset); in bench_futex_hash()
Dfutex-requeue.c126 cpu_set_t *cpuset; in block_threads() local
133 cpuset = CPU_ALLOC(nrcpus); in block_threads()
134 BUG_ON(!cpuset); in block_threads()
142 CPU_ZERO_S(size, cpuset); in block_threads()
143 CPU_SET_S(perf_cpu_map__cpu(cpu, i % perf_cpu_map__nr(cpu)).cpu, size, cpuset); in block_threads()
145 if (pthread_attr_setaffinity_np(&thread_attr, size, cpuset)) { in block_threads()
146 CPU_FREE(cpuset); in block_threads()
151 CPU_FREE(cpuset); in block_threads()
156 CPU_FREE(cpuset); in block_threads()
Dfutex-wake-parallel.c150 cpu_set_t *cpuset; in block_threads() local
157 cpuset = CPU_ALLOC(nrcpus); in block_threads()
158 BUG_ON(!cpuset); in block_threads()
166 CPU_ZERO_S(size, cpuset); in block_threads()
167 CPU_SET_S(perf_cpu_map__cpu(cpu, i % perf_cpu_map__nr(cpu)).cpu, size, cpuset); in block_threads()
169 if (pthread_attr_setaffinity_np(&thread_attr, size, cpuset)) { in block_threads()
170 CPU_FREE(cpuset); in block_threads()
175 CPU_FREE(cpuset); in block_threads()
180 CPU_FREE(cpuset); in block_threads()
Depoll-ctl.c226 cpu_set_t *cpuset; in do_threads() local
236 cpuset = CPU_ALLOC(nrcpus); in do_threads()
237 BUG_ON(!cpuset); in do_threads()
263 CPU_ZERO_S(size, cpuset); in do_threads()
265 size, cpuset); in do_threads()
267 ret = pthread_attr_setaffinity_np(&thread_attr, size, cpuset); in do_threads()
269 CPU_FREE(cpuset); in do_threads()
279 CPU_FREE(cpuset); in do_threads()
284 CPU_FREE(cpuset); in do_threads()
Depoll-wait.c295 cpu_set_t *cpuset; in do_threads() local
313 cpuset = CPU_ALLOC(nrcpus); in do_threads()
314 BUG_ON(!cpuset); in do_threads()
352 CPU_ZERO_S(size, cpuset); in do_threads()
354 size, cpuset); in do_threads()
356 ret = pthread_attr_setaffinity_np(&thread_attr, size, cpuset); in do_threads()
358 CPU_FREE(cpuset); in do_threads()
368 CPU_FREE(cpuset); in do_threads()
373 CPU_FREE(cpuset); in do_threads()
/tools/testing/selftests/intel_pstate/
Daperf.c31 cpu_set_t cpuset; in main() local
54 CPU_ZERO(&cpuset); in main()
55 CPU_SET(cpu, &cpuset); in main()
57 if (sched_setaffinity(0, sizeof(cpu_set_t), &cpuset)) { in main()
/tools/power/cpupower/bench/
Dsystem.c77 cpu_set_t cpuset; in set_cpu_affinity() local
79 CPU_ZERO(&cpuset); in set_cpu_affinity()
80 CPU_SET(cpu, &cpuset); in set_cpu_affinity()
84 if (sched_setaffinity(getpid(), sizeof(cpu_set_t), &cpuset) < 0) { in set_cpu_affinity()
/tools/testing/selftests/bpf/prog_tests/
Dtest_overhead.c49 cpu_set_t cpuset; in setaffinity() local
52 CPU_ZERO(&cpuset); in setaffinity()
53 CPU_SET(cpu, &cpuset); in setaffinity()
54 sched_setaffinity(0, sizeof(cpuset), &cpuset); in setaffinity()
/tools/testing/selftests/bpf/
Dtest_tcpnotify_user.c81 cpu_set_t cpuset; in main() local
86 CPU_ZERO(&cpuset); in main()
87 CPU_SET(0, &cpuset); in main()
88 pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); in main()
/tools/testing/selftests/mm/
Dhugetlb_reparenting_test.sh134 echo 0 >$CGROUP_ROOT/a/cpuset.mems
135 echo 0 >$CGROUP_ROOT/a/cpuset.cpus
141 echo 0 >$CGROUP_ROOT/a/b/cpuset.mems
142 echo 0 >$CGROUP_ROOT/a/b/cpuset.cpus
157 echo 0 >$CGROUP_ROOT/$cgroup/cpuset.mems
158 echo 0 >$CGROUP_ROOT/$cgroup/cpuset.cpus
/tools/virtio/ringtest/
Dmain.c78 cpu_set_t cpuset; in set_affinity() local
93 CPU_ZERO(&cpuset); in set_affinity()
94 CPU_SET(cpu, &cpuset); in set_affinity()
96 ret = pthread_setaffinity_np(self, sizeof(cpu_set_t), &cpuset); in set_affinity()
/tools/testing/selftests/kvm/
Dsteal_time.c248 cpu_set_t cpuset; in main() local
258 CPU_ZERO(&cpuset); in main()
259 CPU_SET(0, &cpuset); in main()
261 pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpuset); in main()
262 pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); in main()
/tools/testing/selftests/vDSO/
Dvdso_test_correctness.c170 cpu_set_t cpuset; in test_getcpu() local
171 CPU_ZERO(&cpuset); in test_getcpu()
172 CPU_SET(cpu, &cpuset); in test_getcpu()
173 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0) in test_getcpu()

12