Home
last modified time | relevance | path

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

123

/Linux-v5.10/Documentation/admin-guide/cgroup-v1/
Dcpusets.rst48 the resources within a task's current cpuset. They form a nested
59 policy, are both filtered through that task's cpuset, filtering out any
60 CPUs or Memory Nodes not in that cpuset. The scheduler will not
67 cpusets and which CPUs and Memory Nodes are assigned to each cpuset,
68 specify and query to which cpuset a task is assigned, and list the
69 task pids assigned to a cpuset.
103 The kernel cpuset patch provides the minimum essential kernel
124 - Each task in the system is attached to a cpuset, via a pointer
127 allowed in that task's cpuset.
129 those Memory Nodes allowed in that task's cpuset.
[all …]
Dmemcg_test.rst174 For NUMA, migration is an another special case. To do easy test, cpuset
177 mount -t cgroup -o cpuset none /opt/cpuset
179 mkdir /opt/cpuset/01
180 echo 1 > /opt/cpuset/01/cpuset.cpus
181 echo 0 > /opt/cpuset/01/cpuset.mems
182 echo 1 > /opt/cpuset/01/cpuset.memory_migrate
183 mkdir /opt/cpuset/02
184 echo 1 > /opt/cpuset/02/cpuset.cpus
185 echo 1 > /opt/cpuset/02/cpuset.mems
186 echo 1 > /opt/cpuset/02/cpuset.memory_migrate
[all …]
/Linux-v5.10/kernel/cgroup/
Dcpuset.c81 struct cpuset { struct
192 static inline struct cpuset *css_cs(struct cgroup_subsys_state *css) in css_cs()
194 return css ? container_of(css, struct cpuset, css) : NULL; in css_cs()
198 static inline struct cpuset *task_cs(struct task_struct *task) in task_cs()
203 static inline struct cpuset *parent_cs(struct cpuset *cs) in parent_cs()
221 static inline bool is_cpuset_online(struct cpuset *cs) in is_cpuset_online()
226 static inline int is_cpu_exclusive(const struct cpuset *cs) in is_cpu_exclusive()
231 static inline int is_mem_exclusive(const struct cpuset *cs) in is_mem_exclusive()
236 static inline int is_mem_hardwall(const struct cpuset *cs) in is_mem_hardwall()
241 static inline int is_sched_load_balance(const struct cpuset *cs) in is_sched_load_balance()
[all …]
/Linux-v5.10/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.c134 cpu_set_t cpuset; in main() local
136 CPU_ZERO(&cpuset); in main()
137 CPU_SET(0, &cpuset); in main()
138 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 …]
Dtest_vdso.c139 cpu_set_t cpuset; in test_getcpu() local
140 CPU_ZERO(&cpuset); in test_getcpu()
141 CPU_SET(cpu, &cpuset); in test_getcpu()
142 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0) in test_getcpu()
/Linux-v5.10/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 …]
/Linux-v5.10/tools/testing/selftests/powerpc/tm/
Dtm-poison.c30 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
273 CPU_ZERO(&cpuset); in tm_trap_test()
274 CPU_SET(cpu, &cpuset); in tm_trap_test()
286 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
352 CPU_ZERO(&cpuset); in tm_unavailable_test()
353 CPU_SET(cpu, &cpuset); in tm_unavailable_test()
361 rc = pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpuset); in tm_unavailable_test()
/Linux-v5.10/tools/testing/selftests/intel_pstate/
Daperf.c27 cpu_set_t cpuset; in main() local
50 CPU_ZERO(&cpuset); in main()
51 CPU_SET(cpu, &cpuset); in main()
53 if (sched_setaffinity(0, sizeof(cpu_set_t), &cpuset)) { in main()
/Linux-v5.10/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()
/Linux-v5.10/samples/bpf/
Dtest_overhead_user.c83 cpu_set_t cpuset; in loop() local
85 CPU_ZERO(&cpuset); in loop()
86 CPU_SET(cpu, &cpuset); in loop()
87 sched_setaffinity(0, sizeof(cpuset), &cpuset); in loop()
/Linux-v5.10/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()
/Linux-v5.10/tools/testing/selftests/vm/
Dhugetlb_reparenting_test.sh126 echo 0 >$CGROUP_ROOT/a/cpuset.mems
127 echo 0 >$CGROUP_ROOT/a/cpuset.cpus
133 echo 0 >$CGROUP_ROOT/a/b/cpuset.mems
134 echo 0 >$CGROUP_ROOT/a/b/cpuset.cpus
149 echo 0 >$CGROUP_ROOT/$cgroup/cpuset.mems
150 echo 0 >$CGROUP_ROOT/$cgroup/cpuset.cpus
/Linux-v5.10/tools/testing/selftests/bpf/
Dtest_tcpnotify_user.c82 cpu_set_t cpuset; in main() local
85 CPU_ZERO(&cpuset); in main()
86 CPU_SET(0, &cpuset); in main()
87 pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); in main()
/Linux-v5.10/tools/perf/bench/
Dfutex-wake.c96 cpu_set_t cpuset; in block_threads() local
103 CPU_ZERO(&cpuset); in block_threads()
104 CPU_SET(cpu->map[i % cpu->nr], &cpuset); in block_threads()
106 if (pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpuset)) in block_threads()
Dfutex-requeue.c90 cpu_set_t cpuset; in block_threads() local
97 CPU_ZERO(&cpuset); in block_threads()
98 CPU_SET(cpu->map[i % cpu->nr], &cpuset); in block_threads()
100 if (pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpuset)) in block_threads()
Dfutex-hash.c123 cpu_set_t cpuset; in bench_futex_hash() local
172 CPU_ZERO(&cpuset); in bench_futex_hash()
173 CPU_SET(cpu->map[i % cpu->nr], &cpuset); in bench_futex_hash()
175 ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpuset); in bench_futex_hash()
Dfutex-lock-pi.c121 cpu_set_t cpuset; in create_threads() local
136 CPU_ZERO(&cpuset); in create_threads()
137 CPU_SET(cpu->map[i % cpu->nr], &cpuset); in create_threads()
139 if (pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpuset)) in create_threads()
/Linux-v5.10/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()
/Linux-v5.10/tools/testing/selftests/kvm/
Dsteal_time.c278 cpu_set_t cpuset; in main() local
288 CPU_ZERO(&cpuset); in main()
289 CPU_SET(0, &cpuset); in main()
291 pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpuset); in main()
292 pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); in main()

123