/third_party/ltp/testcases/kernel/controllers/cpuset/cpuset_hierarchy_test/ |
D | cpuset_hierarchy_test.sh | 48 cpuset_log "father cpuset.cpus $(cat "$CPUSET/father/cpuset.cpus")" 49 cpuset_log "child cpuset.cpus $(cat "$CPUSET/father/child/cpuset.cpus")" 51 test -z "$(cat "$CPUSET/father/cpuset.cpus")" || return 1 52 test -z "$(cat "$CPUSET/father/child/cpuset.cpus")" || return 1 60 cpuset_log "father cpuset.cpus $(cat "$CPUSET/father/cpuset.cpus")" 61 cpuset_log "child cpuset.cpus $(cat "$CPUSET/father/child/cpuset.cpus")" 63 test -z "$(cat "$CPUSET/father/cpuset.cpus")" || return 1 64 test -z "$(cat "$CPUSET/father/child/cpuset.cpus")" || return 1 72 cpuset_log "father cpuset.cpus $(cat "$CPUSET/father/cpuset.cpus")" 73 cpuset_log "child cpuset.cpus $(cat "$CPUSET/father/child/cpuset.cpus")" [all …]
|
/third_party/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/ |
D | cpuset.h | 179 struct cpuset; 185 struct cpuset *cpuset_alloc(void); 186 void cpuset_free(struct cpuset *cp); 191 int cpuset_setcpus(struct cpuset *cp, const struct bitmask *cpus); 192 int cpuset_setmems(struct cpuset *cp, const struct bitmask *mems); 193 int cpuset_set_iopt(struct cpuset *cp, const char *optionname, int value); 194 int cpuset_set_sopt(struct cpuset *cp, const char *optionname, 201 int cpuset_getcpus(const struct cpuset *cp, struct bitmask *cpus); 202 int cpuset_getmems(const struct cpuset *cp, struct bitmask *mems); 203 int cpuset_cpus_weight(const struct cpuset *cp); [all …]
|
D | libcpuset.c | 69 struct cpuset { struct 611 struct cpuset *cpuset_alloc(void) in cpuset_alloc() 613 struct cpuset *cp = NULL; in cpuset_alloc() 616 if ((cp = calloc(1, sizeof(struct cpuset))) == NULL) in cpuset_alloc() 638 void cpuset_free(struct cpuset *cp) in cpuset_free() 666 int cpuset_setcpus(struct cpuset *cp, const struct bitmask *cpus) in cpuset_setcpus() 680 int cpuset_setmems(struct cpuset *cp, const struct bitmask *mems) in cpuset_setmems() 694 int cpuset_set_iopt(struct cpuset *cp, const char *optionname, int value) in cpuset_set_iopt() 742 int cpuset_set_sopt(UNUSED struct cpuset *cp, UNUSED const char *optionname, in cpuset_set_sopt() 783 static const struct cpuset *resolve_cp(const struct cpuset *cp, in resolve_cp() [all …]
|
D | cpuinfo.c | 313 static struct cpuset **cpusets; 318 struct cpuset *cp = NULL; in find_domain_cpusets() 426 struct cpuset *cpa = cpusets[i]; in partition_domains() 434 struct cpuset *cpb = cpusets[j]; in partition_domains()
|
/third_party/rust/crates/rustix/src/backend/linux_raw/process/ |
D | cpu_set.rs | 7 pub(crate) fn CPU_SET(cpu: usize, cpuset: &mut RawCpuSet) { in CPU_SET() 8 let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); // 32, 64 etc in CPU_SET() 10 cpuset.bits[idx] |= 1 << offset in CPU_SET() 14 pub(crate) fn CPU_ZERO(cpuset: &mut RawCpuSet) { in CPU_ZERO() 16 for element in &mut cpuset.bits { in CPU_ZERO() 22 pub(crate) fn CPU_CLR(cpu: usize, cpuset: &mut RawCpuSet) { in CPU_CLR() 23 let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); // 32, 64 etc in CPU_CLR() 25 cpuset.bits[idx] &= !(1 << offset) in CPU_CLR() 29 pub(crate) fn CPU_ISSET(cpu: usize, cpuset: &RawCpuSet) -> bool { in CPU_ISSET() 30 let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); in CPU_ISSET() [all …]
|
D | syscalls.rs | 194 pub(crate) fn sched_getaffinity(pid: Option<Pid>, cpuset: &mut RawCpuSet) -> io::Result<()> { in sched_getaffinity() 203 by_mut(&mut cpuset.bits) in sched_getaffinity() 205 let bytes = (cpuset as *mut RawCpuSet).cast::<u8>(); in sched_getaffinity() 214 pub(crate) fn sched_setaffinity(pid: Option<Pid>, cpuset: &RawCpuSet) -> io::Result<()> { in sched_setaffinity() 220 slice_just_addr(&cpuset.bits) in sched_setaffinity()
|
/third_party/rust/crates/rustix/src/backend/libc/process/ |
D | cpu_set.rs | 7 pub(crate) fn CPU_SET(cpu: usize, cpuset: &mut RawCpuSet) { in CPU_SET() 14 unsafe { c::CPU_SET(cpu, cpuset) } in CPU_SET() 18 pub(crate) fn CPU_ZERO(cpuset: &mut RawCpuSet) { in CPU_ZERO() 19 unsafe { c::CPU_ZERO(cpuset) } in CPU_ZERO() 23 pub(crate) fn CPU_CLR(cpu: usize, cpuset: &mut RawCpuSet) { in CPU_CLR() 30 unsafe { c::CPU_CLR(cpu, cpuset) } in CPU_CLR() 34 pub(crate) fn CPU_ISSET(cpu: usize, cpuset: &RawCpuSet) -> bool { in CPU_ISSET() 41 unsafe { c::CPU_ISSET(cpu, cpuset) } in CPU_ISSET() 46 pub(crate) fn CPU_COUNT(cpuset: &RawCpuSet) -> u32 { in CPU_COUNT() 48 unsafe { c::CPU_COUNT(cpuset).try_into().unwrap() } in CPU_COUNT()
|
D | syscalls.rs | 178 pub(crate) fn sched_getaffinity(pid: Option<Pid>, cpuset: &mut RawCpuSet) -> io::Result<()> { in sched_getaffinity() 183 cpuset, in sched_getaffinity() 195 pub(crate) fn sched_setaffinity(pid: Option<Pid>, cpuset: &RawCpuSet) -> io::Result<()> { in sched_setaffinity() 200 cpuset, in sched_setaffinity()
|
/third_party/ltp/testcases/kernel/controllers/cpuset/ |
D | README | 4 The directory cpuset contains the tests related to the cpuset controller. 11 cpuset, such as: adding/removing cpus/mems, setting flags, exclusive function, 12 hierarchy relation, inherit relation, cpuset VS syscall and so on 19 The aim of the tests is to test the functionality of cpuset. 26 operation of cpuset. such as: adding/removing cpus/mems, setting flags. 31 function of cpuset. 36 of cpuset. 41 syscalls whether they collide with cpuset. 46 cpu hotplug whether they collide with cpuset. 52 whether load balance breaks the cpuset's limit. [all …]
|
D | cpuset_funcs.sh | 125 CPUSET_CONTROLLER=`grep -w cpuset /proc/cgroups | cut -f1` 126 CPUSET_CONTROLLER_VALUE=`grep -w cpuset /proc/cgroups | cut -f4` 174 mount -t cgroup -o cpuset cpuset "$CPUSET" 2> /dev/null 238 /bin/echo $cpus > $path/cpuset.cpus 244 /bin/echo $mems > $path/cpuset.mems 250 /bin/echo $load_balance > $path/cpuset.sched_load_balance
|
D | cpuset_regression_test.sh | 131 root_cpuset_dir=$(get_cgroup_mountpoint cpuset) 136 ROD_SILENT mount -t cpuset cpuset ${root_cpuset_dir}
|
/third_party/pulseaudio/src/tests/ |
D | atomic-test.c | 58 cpu_set_t cpuset; member 65 pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &io->cpuset); in read_func() 79 pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &io->cpuset); in write_func() 102 CPU_ZERO(&io1.cpuset); in START_TEST() 103 CPU_SET(1, &io1.cpuset); in START_TEST() 106 CPU_ZERO(&io2.cpuset); in START_TEST() 107 CPU_SET(3, &io2.cpuset); in START_TEST()
|
/third_party/skia/third_party/externals/swiftshader/third_party/marl/src/ |
D | thread.cpp | 151 cpu_set_t cpuset; in all() local 152 CPU_ZERO(&cpuset); in all() 153 if (pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset) == 0) { in all() 154 int count = CPU_COUNT(&cpuset); in all() 163 cpuset_t cpuset; in all() local 164 CPU_ZERO(&cpuset); in all() 165 if (pthread_getaffinity_np(thread, sizeof(cpuset_t), &cpuset) == 0) { in all() 166 int count = CPU_COUNT(&cpuset); in all() 379 cpu_set_t cpuset; in setAffinity() local 380 CPU_ZERO(&cpuset); in setAffinity() [all …]
|
/third_party/ltp/runtest/ |
D | controllers | 24 cgroup_fj_function_cpuset cgroup_fj_function.sh cpuset 61 # Stress test for cpuset cgroup 62 cgroup_fj_stress_cpuset_2_2_none cgroup_fj_stress.sh cpuset 2 2 none 63 cgroup_fj_stress_cpuset_3_3_none cgroup_fj_stress.sh cpuset 3 3 none 64 cgroup_fj_stress_cpuset_4_4_none cgroup_fj_stress.sh cpuset 4 4 none 65 cgroup_fj_stress_cpuset_2_9_none cgroup_fj_stress.sh cpuset 2 9 none 66 cgroup_fj_stress_cpuset_10_3_none cgroup_fj_stress.sh cpuset 10 3 none 67 cgroup_fj_stress_cpuset_1_200_none cgroup_fj_stress.sh cpuset 1 200 none 68 cgroup_fj_stress_cpuset_200_1_none cgroup_fj_stress.sh cpuset 200 1 none 70 cgroup_fj_stress_cpuset_2_2_one cgroup_fj_stress.sh cpuset 2 2 one [all …]
|
/third_party/mesa3d/src/util/ |
D | u_thread.h | 174 cpu_set_t cpuset; in util_set_thread_affinity() local 177 if (pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset) != 0) in util_set_thread_affinity() 182 if (CPU_ISSET(i, &cpuset)) in util_set_thread_affinity() 187 CPU_ZERO(&cpuset); in util_set_thread_affinity() 190 CPU_SET(i, &cpuset); in util_set_thread_affinity() 192 return pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset) == 0; in util_set_thread_affinity()
|
/third_party/rust/crates/rustix/src/process/ |
D | sched.rs | 91 pub fn sched_setaffinity(pid: Option<Pid>, cpuset: &CpuSet) -> io::Result<()> { in sched_setaffinity() 92 backend::process::syscalls::sched_setaffinity(pid, &cpuset.cpu_set) in sched_setaffinity() 108 let mut cpuset = CpuSet::new(); in sched_getaffinity() localVariable 109 backend::process::syscalls::sched_getaffinity(pid, &mut cpuset.cpu_set).and(Ok(cpuset)) in sched_getaffinity()
|
/third_party/toybox/toys/other/ |
D | taskset.c | 38 #define sched_setaffinity(pid, size, cpuset) \ argument 39 syscall(__NR_sched_setaffinity, (pid_t)pid, (size_t)size, (void *)cpuset) 40 #define sched_getaffinity(pid, size, cpuset) \ argument 41 syscall(__NR_sched_getaffinity, (pid_t)pid, (size_t)size, (void *)cpuset)
|
/third_party/ltp/testcases/kernel/controllers/ |
D | README | 11 The cpuset controller also creates the device as /dev/cpuset, so please do the 45 cpuset 47 Directory containing the cpuset controller testcases. A similar directory will 68 And before starting test cpuset, Please check whether the test system has
|
D | testplan.txt | 5 of cpu controller, memory controller and cpuset controller. 6 There are test cases to test cpu, memory and cpuset controller. In future new
|
/third_party/rust/crates/nix/src/ |
D | sched.rs | 262 pub fn sched_setaffinity(pid: Pid, cpuset: &CpuSet) -> Result<()> { in sched_setaffinity() 267 &cpuset.cpu_set, in sched_setaffinity() 297 let mut cpuset = CpuSet::new(); in sched_getaffinity() localVariable 302 &mut cpuset.cpu_set, in sched_getaffinity() 306 Errno::result(res).and(Ok(cpuset)) in sched_getaffinity()
|
/third_party/musl/porting/liteos_a/user/src/sched/ |
D | affinity.c | 26 unsigned int cpuset; in do_getaffinity() local 30 int ret = __syscall(SYS_sched_getaffinity, tid, &cpuset, flag); in do_getaffinity() 34 set->__bits[0] = (long)cpuset; in do_getaffinity()
|
/third_party/openh264/codec/common/src/ |
D | WelsThreadLib.cpp | 486 cpu_set_t cpuset; in WelsQueryLogicalProcessInfo() 488 CPU_ZERO (&cpuset); in WelsQueryLogicalProcessInfo() 490 if (!sched_getaffinity (0, sizeof (cpuset), &cpuset)) { in WelsQueryLogicalProcessInfo() 492 pInfo->ProcessorCount = CPU_COUNT (&cpuset); in WelsQueryLogicalProcessInfo() 496 if (CPU_ISSET (i, &cpuset)) { in WelsQueryLogicalProcessInfo()
|
/third_party/musl/Benchmark/musl/ |
D | benchmark_framework.cpp | 157 cpu_set_t cpuset; in LockAndRun() local 158 CPU_ZERO(&cpuset); in LockAndRun() 159 CPU_SET(cpuNum, &cpuset); in LockAndRun() 161 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0) { in LockAndRun()
|
/third_party/ffmpeg/libavutil/ |
D | cpu.c | 284 cpu_set_t cpuset; in av_cpu_count() local 286 CPU_ZERO(&cpuset); in av_cpu_count() 288 if (!sched_getaffinity(0, sizeof(cpuset), &cpuset)) in av_cpu_count() 289 nb_cpus = CPU_COUNT(&cpuset); in av_cpu_count()
|
/third_party/rust/crates/libc/src/unix/linux_like/emscripten/ |
D | mod.rs | 1692 pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { 1693 for slot in cpuset.bits.iter_mut() { 1698 pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { 1700 = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc 1702 cpuset.bits[idx] |= 1 << offset; 1706 pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { 1708 = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc 1710 cpuset.bits[idx] &= !(1 << offset); 1714 pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { 1715 let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); [all …]
|