/linux-6.1.9/Documentation/admin-guide/cgroup-v1/ |
D | cpusets.rst | 48 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 …]
|
D | memcg_test.rst | 165 For NUMA, migration is an another special case. To do easy test, cpuset 168 mount -t cgroup -o cpuset none /opt/cpuset 170 mkdir /opt/cpuset/01 171 echo 1 > /opt/cpuset/01/cpuset.cpus 172 echo 0 > /opt/cpuset/01/cpuset.mems 173 echo 1 > /opt/cpuset/01/cpuset.memory_migrate 174 mkdir /opt/cpuset/02 175 echo 1 > /opt/cpuset/02/cpuset.cpus 176 echo 1 > /opt/cpuset/02/cpuset.mems 177 echo 1 > /opt/cpuset/02/cpuset.memory_migrate [all …]
|
/linux-6.1.9/kernel/cgroup/ |
D | cpuset.c | 113 struct cpuset { struct 232 static inline struct cpuset *css_cs(struct cgroup_subsys_state *css) in css_cs() 234 return css ? container_of(css, struct cpuset, css) : NULL; in css_cs() 238 static inline struct cpuset *task_cs(struct task_struct *task) in task_cs() 243 static inline struct cpuset *parent_cs(struct cpuset *cs) in parent_cs() 261 static inline bool is_cpuset_online(struct cpuset *cs) in is_cpuset_online() 266 static inline int is_cpu_exclusive(const struct cpuset *cs) in is_cpu_exclusive() 271 static inline int is_mem_exclusive(const struct cpuset *cs) in is_mem_exclusive() 276 static inline int is_mem_hardwall(const struct cpuset *cs) in is_mem_hardwall() 281 static inline int is_sched_load_balance(const struct cpuset *cs) in is_sched_load_balance() [all …]
|
/linux-6.1.9/tools/testing/selftests/cgroup/ |
D | test_cpuset_prs.sh | 53 echo +cpuset > cgroup.subtree_control 82 echo $EXPECTED_VAL > cpuset.cpus.partition 84 ACTUAL_VAL=$(cat cpuset.cpus.partition) 95 ACTUAL_VAL=$(cat cpuset.cpus.effective) 122 echo 2-3 > cpuset.cpus 123 TYPE=$(cat cpuset.cpus.partition) 124 [[ $TYPE = member ]] || echo member > cpuset.cpus.partition 148 echo +cpuset > cgroup.subtree_control 153 echo 2-3 > cpuset.cpus 167 echo 2 > cpuset.cpus [all …]
|
/linux-6.1.9/Documentation/translations/zh_CN/scheduler/ |
D | sched-capacity.rst | 259 是,这个键是系统范围可见的。想象下面使用了cpuset的步骤:: 272 mkdir /sys/fs/cgroup/cpuset/cs0 273 echo 0-1 > /sys/fs/cgroup/cpuset/cs0/cpuset.cpus 274 echo 0 > /sys/fs/cgroup/cpuset/cs0/cpuset.mems 276 mkdir /sys/fs/cgroup/cpuset/cs1 277 echo 2-7 > /sys/fs/cgroup/cpuset/cs1/cpuset.cpus 278 echo 0 > /sys/fs/cgroup/cpuset/cs1/cpuset.mems 280 echo 0 > /sys/fs/cgroup/cpuset/cpuset.sched_load_balance
|
/linux-6.1.9/tools/testing/selftests/x86/ |
D | sysret_ss_attrs.c | 55 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()
|
D | ioperm.c | 90 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()
|
D | iopl.c | 174 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()
|
D | ldt_gdt.c | 437 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 …]
|
/linux-6.1.9/tools/testing/selftests/powerpc/benchmarks/ |
D | fork.c | 32 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()
|
D | context_switch.c | 78 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-6.1.9/tools/testing/selftests/powerpc/tm/ |
D | tm-poison.c | 29 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()
|
/linux-6.1.9/tools/perf/bench/ |
D | futex-wake.c | 101 cpu_set_t *cpuset; in block_threads() local 107 cpuset = CPU_ALLOC(nrcpus); in block_threads() 108 BUG_ON(!cpuset); in block_threads() 113 CPU_ZERO_S(size, cpuset); in block_threads() 114 CPU_SET_S(perf_cpu_map__cpu(cpu, i % perf_cpu_map__nr(cpu)).cpu, size, cpuset); in block_threads() 116 if (pthread_attr_setaffinity_np(&thread_attr, size, cpuset)) { in block_threads() 117 CPU_FREE(cpuset); in block_threads() 122 CPU_FREE(cpuset); in block_threads() 126 CPU_FREE(cpuset); in block_threads()
|
D | futex-hash.c | 126 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()
|
D | futex-lock-pi.c | 124 cpu_set_t *cpuset; in create_threads() local 131 cpuset = CPU_ALLOC(nrcpus); in create_threads() 132 BUG_ON(!cpuset); in create_threads() 145 CPU_ZERO_S(size, cpuset); in create_threads() 146 CPU_SET_S(perf_cpu_map__cpu(cpu, i % perf_cpu_map__nr(cpu)).cpu, size, cpuset); in create_threads() 148 if (pthread_attr_setaffinity_np(&thread_attr, size, cpuset)) { in create_threads() 149 CPU_FREE(cpuset); in create_threads() 154 CPU_FREE(cpuset); in create_threads() 158 CPU_FREE(cpuset); in create_threads()
|
D | futex-requeue.c | 127 cpu_set_t *cpuset; in block_threads() local 134 cpuset = CPU_ALLOC(nrcpus); in block_threads() 135 BUG_ON(!cpuset); in block_threads() 140 CPU_ZERO_S(size, cpuset); in block_threads() 141 CPU_SET_S(perf_cpu_map__cpu(cpu, i % perf_cpu_map__nr(cpu)).cpu, size, cpuset); in block_threads() 143 if (pthread_attr_setaffinity_np(&thread_attr, size, cpuset)) { in block_threads() 144 CPU_FREE(cpuset); in block_threads() 149 CPU_FREE(cpuset); in block_threads() 153 CPU_FREE(cpuset); in block_threads()
|
D | futex-wake-parallel.c | 148 cpu_set_t *cpuset; in block_threads() local 155 cpuset = CPU_ALLOC(nrcpus); in block_threads() 156 BUG_ON(!cpuset); in block_threads() 161 CPU_ZERO_S(size, cpuset); in block_threads() 162 CPU_SET_S(perf_cpu_map__cpu(cpu, i % perf_cpu_map__nr(cpu)).cpu, size, cpuset); in block_threads() 164 if (pthread_attr_setaffinity_np(&thread_attr, size, cpuset)) { in block_threads() 165 CPU_FREE(cpuset); in block_threads() 170 CPU_FREE(cpuset); in block_threads() 174 CPU_FREE(cpuset); in block_threads()
|
D | epoll-ctl.c | 226 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()
|
/linux-6.1.9/Documentation/translations/zh_CN/mm/ |
D | hugetlbfs_reserv.rst | 415 * 当cpuset被配置时,它打破了严格的hugetlb页面预留,因为计数是在一个全局变量上完 416 * 成的。在有cpuset的情况下,这样的预留完全是垃圾,因为预留没有根据当前cpuset的 417 * 页面可用性来检查。在任务所在的cpuset中缺乏空闲的htlb页面时,应用程序仍然有可能 418 * 被内核OOM'ed。试图用cpuset来执行严格的计数几乎是不可能的(或者说太难看了),因 419 * 为cpuset太不稳定了,任务或内存节点可以在cpuset之间动态移动。与cpuset共享 421 * 页的可用性,作为一种最好的尝试,希望能将cpuset改变语义的影响降到最低。
|
/linux-6.1.9/tools/testing/selftests/bpf/prog_tests/ |
D | test_overhead.c | 49 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-6.1.9/tools/testing/selftests/intel_pstate/ |
D | aperf.c | 31 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()
|
/linux-6.1.9/tools/power/cpupower/bench/ |
D | system.c | 77 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-6.1.9/samples/bpf/ |
D | test_overhead_user.c | 86 cpu_set_t cpuset; in loop() local 88 CPU_ZERO(&cpuset); in loop() 89 CPU_SET(cpu, &cpuset); in loop() 90 sched_setaffinity(0, sizeof(cpuset), &cpuset); in loop()
|
/linux-6.1.9/tools/testing/selftests/vm/ |
D | hugetlb_reparenting_test.sh | 134 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
|
/linux-6.1.9/tools/testing/selftests/bpf/ |
D | test_tcpnotify_user.c | 81 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()
|