Searched refs:cpuset (Results 1 - 25 of 30) sorted by relevance

12

/external/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/
H A Dcpuset.h2 * cpuset header file
26 * cpusets - basic routines (use cpuset relative numbering of CPUs)
30 * cpuset_pin(int relcpu) - Pin current task to one CPU in its cpuset.
31 * cpuset_size() - How many CPUs are in current tasks cpuset?
32 * cpuset_where() - Most recent CPU in current tasks cpuset that task ran on.
33 * cpuset_unpin() - Undo cpuset_pin(), let task run anywhere in its cpuset.
44 * ==== Allocate and free struct cpuset ====
46 * cpuset_alloc() - Allocate a new struct cpuset
47 * cpuset_free(struct cpuset *cp) - Free struct cpuset *c
[all...]
H A Dlibcpuset.c2 * cpuset user library implementation.
48 #include "cpuset.h"
69 struct cpuset { struct
92 * we create a new cpuset, we don't accidentally overwrite
132 /* Presumed cpuset file system mount point */
133 static const char *cpusetmnt = "/dev/cpuset";
222 * Check that cpusets supported, /dev/cpuset mounted.
226 * ENODEV - /dev/cpuset not mounted
241 if (stat("/proc/self/cpuset", &statbuf) < 0) {
246 if (stat("/dev/cpuset/task
3196 struct cpuset *cpuset; member in struct:cpuset_fts_entry
[all...]
H A Dcpuinfo.c11 #include "cpuset.h"
287 /* get the number of the cpuset groups */
302 if (!strncmp(buf, "cpuset", 6)) {
313 static struct cpuset **cpusets;
318 struct cpuset *cp = NULL;
371 warnx("cpuset subsystem is't compiled into kernel.");
426 struct cpuset *cpa = cpusets[i];
434 struct cpuset *cpb = cpusets[j];
462 warnx("cpuset getcpus failed.");
/external/linux-kselftest/tools/testing/selftests/x86/
H A Dsysret_ss_attrs.c63 cpu_set_t cpuset; local
64 CPU_ZERO(&cpuset);
65 CPU_SET(0, &cpuset);
66 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0)
H A Diopl.c46 cpu_set_t cpuset; local
47 CPU_ZERO(&cpuset);
48 CPU_SET(0, &cpuset);
49 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0)
H A Dldt_gdt.c379 cpu_set_t cpuset; local
380 CPU_ZERO(&cpuset);
381 CPU_SET(1, &cpuset);
382 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0)
428 cpu_set_t cpuset; local
433 CPU_ZERO(&cpuset);
434 CPU_SET(1, &cpuset);
435 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) !
[all...]
H A Dfsgsbase.c369 cpu_set_t cpuset; local
370 CPU_ZERO(&cpuset);
371 CPU_SET(0, &cpuset);
372 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) != 0)
/external/strace/tests/
H A Dsched_xetaffinity.c80 cpu_set_t *cpuset = tail_alloc(cpuset_size); local
81 getaffinity(pid, cpuset_size, cpuset + 1);
83 pid, cpuset_size, cpuset + 1, errstr);
85 int ret_size = getaffinity(pid, cpuset_size, cpuset);
88 pid, (unsigned) cpuset_size, cpuset, errstr);
95 if (CPU_ISSET_S(i, (unsigned) ret_size, cpuset)) {
103 CPU_ZERO_S(cpuset_size, cpuset);
104 CPU_SET_S(cpu, cpuset_size, cpuset);
105 if (setaffinity(pid, cpuset_size, cpuset))
111 cpuset
[all...]
/external/strace/tests-m32/
H A Dsched_xetaffinity.c80 cpu_set_t *cpuset = tail_alloc(cpuset_size); local
81 getaffinity(pid, cpuset_size, cpuset + 1);
83 pid, cpuset_size, cpuset + 1, errstr);
85 int ret_size = getaffinity(pid, cpuset_size, cpuset);
88 pid, (unsigned) cpuset_size, cpuset, errstr);
95 if (CPU_ISSET_S(i, (unsigned) ret_size, cpuset)) {
103 CPU_ZERO_S(cpuset_size, cpuset);
104 CPU_SET_S(cpu, cpuset_size, cpuset);
105 if (setaffinity(pid, cpuset_size, cpuset))
111 cpuset
[all...]
/external/strace/tests-mx32/
H A Dsched_xetaffinity.c80 cpu_set_t *cpuset = tail_alloc(cpuset_size); local
81 getaffinity(pid, cpuset_size, cpuset + 1);
83 pid, cpuset_size, cpuset + 1, errstr);
85 int ret_size = getaffinity(pid, cpuset_size, cpuset);
88 pid, (unsigned) cpuset_size, cpuset, errstr);
95 if (CPU_ISSET_S(i, (unsigned) ret_size, cpuset)) {
103 CPU_ZERO_S(cpuset_size, cpuset);
104 CPU_SET_S(cpu, cpuset_size, cpuset);
105 if (setaffinity(pid, cpuset_size, cpuset))
111 cpuset
[all...]
/external/linux-kselftest/tools/testing/selftests/powerpc/context_switch/
H A Dcp_abort.c69 cpu_set_t cpuset; local
80 CPU_ZERO(&cpuset);
81 CPU_SET(pick_online_cpu(), &cpuset); local
82 FAIL_IF(sched_setaffinity(0, sizeof(cpuset), &cpuset));
/external/ltp/testcases/kernel/controllers/cpuset/
H A Dcpuset_regression_test.sh47 # We need to mount cpuset if it is not found.
49 grep -w cpuset /proc/mounts > tmpfile
57 ROD_SILENT mount -t cpuset cpuset ${root_cpuset_dir}
62 if [ -f ${root_cpuset_dir}/cpuset.cpu_exclusive ]; then
63 cpu_exclusive=cpuset.cpu_exclusive
64 cpus=cpuset.cpus
69 tst_brkm TBROK "Both cpuset.cpu_exclusive and cpu_exclusive" \
117 # Creat an exclusive cpuset.
H A Dcpuset_funcs.sh3 # functions for cpuset test
38 CPUSET="/dev/cpuset"
91 CPUSET_CONTROLLER=`grep -w cpuset /proc/cgroups | cut -f1`
92 CPUSET_CONTROLLER_VALUE=`grep -w cpuset /proc/cgroups | cut -f4`
94 if [ "$CPUSET_CONTROLLER" = "cpuset" ] && [ "$CPUSET_CONTROLLER_VALUE" = "1" ]
120 # Create /dev/cpuset & mount the cgroup file system with cpuset
132 mount -t cpuset cpuset "$CPUSET" 2> /dev/null
136 " cpuset o
[all...]
/external/autotest/client/tests/monotonic_time/src/
H A DMakefile8 SRCS= time_test.c cpuset.c threads.c logging.c
9 HDRS= spinlock.h cpuset.h threads.h logging.h
/external/linux-kselftest/tools/testing/selftests/powerpc/tm/
H A Dtm-tmspr.c44 cpu_set_t cpuset; local
46 CPU_ZERO(&cpuset);
48 CPU_SET(cpu, &cpuset);
49 sched_setaffinity(0, sizeof(cpuset), &cpuset);
/external/libhevc/common/
H A Dithread.c153 cpu_set_t cpuset; local
160 CPU_ZERO(&cpuset);
161 CPU_SET(core_id, &cpuset);
163 return pthread_setaffinity_np(cur_thread, sizeof(cpu_set_t), &cpuset);
/external/linux-kselftest/tools/testing/selftests/intel_pstate/
H A Daperf.c24 cpu_set_t cpuset; local
47 CPU_ZERO(&cpuset);
48 CPU_SET(cpu, &cpuset);
50 if (sched_setaffinity(0, sizeof(cpu_set_t), &cpuset)) {
/external/stressapptest/src/
H A Dsattypes.h120 static inline int cpuset_count(const cpu_set_t *cpuset) { argument
123 if (CPU_ISSET(i, cpuset))
128 static inline void cpuset_set_ab(cpu_set_t *cpuset, int a, int b) { argument
129 CPU_ZERO(cpuset);
131 CPU_SET(i, cpuset);
134 static inline string cpuset_format(const cpu_set_t *cpuset) { argument
138 if (CPU_ISSET(i, cpuset)) {
H A Dworker.cc395 bool WorkerThread::AvailableCpus(cpu_set_t *cpuset) { argument
396 CPU_ZERO(cpuset);
398 return sched_getaffinity(getppid(), sizeof(*cpuset), cpuset) == 0;
409 bool WorkerThread::CurrentCpus(cpu_set_t *cpuset) { argument
410 CPU_ZERO(cpuset);
412 return sched_getaffinity(0, sizeof(*cpuset), cpuset) == 0;
3504 cpu_set_t cpuset; local
3505 if (!AvailableCpus(&cpuset)) {
[all...]
/external/libavc/common/
H A Dithread.c178 cpu_set_t cpuset; local
185 CPU_ZERO(&cpuset);
186 CPU_SET(core_id, &cpuset);
188 return pthread_setaffinity_np(cur_thread, sizeof(cpu_set_t), &cpuset);
/external/libmpeg2/common/
H A Dithread.c160 cpu_set_t cpuset; local
167 CPU_ZERO(&cpuset);
168 CPU_SET(core_id, &cpuset);
170 return pthread_setaffinity_np(cur_thread, sizeof(cpu_set_t), &cpuset);
/external/linux-kselftest/tools/testing/selftests/powerpc/benchmarks/
H A Dcontext_switch.c79 cpu_set_t cpuset; local
82 CPU_ZERO(&cpuset);
83 CPU_SET(cpu, &cpuset);
87 if (pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpuset)) {
101 cpu_set_t cpuset; local
112 CPU_ZERO(&cpuset);
113 CPU_SET(cpu, &cpuset);
115 if (sched_setaffinity(0, sizeof(cpuset), &cpuset)) {
/external/toybox/toys/other/
H A Dtaskset.c38 #define sched_setaffinity(pid, size, cpuset) \
39 syscall(__NR_sched_setaffinity, (pid_t)pid, (size_t)size, (void *)cpuset)
40 #define sched_getaffinity(pid, size, cpuset) \
41 syscall(__NR_sched_getaffinity, (pid_t)pid, (size_t)size, (void *)cpuset)
/external/fio/os/
H A Dos-freebsd.h12 #include <sys/cpuset.h>
/external/ltp/testcases/kernel/controllers/cgroup/
H A Dcgroup_regression_test.sh280 if [ "$subsys1" == cpuset -o "$subsys2" == cpuset ]; then
281 echo 0 > cgroup/0/cpuset.cpus 2> /dev/null
282 echo 0 > cgroup/0/cpuset.mems 2> /dev/null

Completed in 5782 milliseconds

12