File: hwlocality_linux.3

package info (click to toggle)
hwloc 2.12.0-4~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 23,576 kB
  • sloc: ansic: 60,875; xml: 13,559; sh: 7,332; makefile: 2,154; javascript: 879; cpp: 93; php: 8; sed: 5
file content (98 lines) | stat: -rw-r--r-- 3,050 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
.TH "hwlocality_linux" 3 "Version 2.12.0" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
hwlocality_linux \- Linux-specific helpers
.SH SYNOPSIS
.br
.PP
.SS "Functions"

.in +1c
.ti -1c
.RI "int \fBhwloc_linux_set_tid_cpubind\fP (\fBhwloc_topology_t\fP topology, pid_t tid, \fBhwloc_const_cpuset_t\fP set)"
.br
.ti -1c
.RI "int \fBhwloc_linux_get_tid_cpubind\fP (\fBhwloc_topology_t\fP topology, pid_t tid, \fBhwloc_cpuset_t\fP set)"
.br
.ti -1c
.RI "int \fBhwloc_linux_get_tid_last_cpu_location\fP (\fBhwloc_topology_t\fP topology, pid_t tid, \fBhwloc_bitmap_t\fP set)"
.br
.ti -1c
.RI "int \fBhwloc_linux_read_path_as_cpumask\fP (const char *path, \fBhwloc_bitmap_t\fP set)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This includes helpers for manipulating Linux kernel cpumap files, and hwloc equivalents of the Linux sched_setaffinity and sched_getaffinity system calls\&. 
.SH "Function Documentation"
.PP 
.SS "int hwloc_linux_get_tid_cpubind (\fBhwloc_topology_t\fP topology, pid_t tid, \fBhwloc_cpuset_t\fP set)"

.PP
Get the current binding of thread \fCtid\fP\&. The CPU-set \fCset\fP (previously allocated by the caller) is filled with the list of PUs which the thread was last bound to\&.
.PP
The behavior is exactly the same as the Linux sched_getaffinity system call, but uses a hwloc cpuset\&.
.PP
\fBReturns\fP
.RS 4
0 on success, -1 on error\&.
.RE
.PP
\fBNote\fP
.RS 4
This is equivalent to calling \fBhwloc_get_proc_cpubind()\fP with \fBHWLOC_CPUBIND_THREAD\fP as flags\&. 
.RE
.PP

.SS "int hwloc_linux_get_tid_last_cpu_location (\fBhwloc_topology_t\fP topology, pid_t tid, \fBhwloc_bitmap_t\fP set)"

.PP
Get the last physical CPU where thread \fCtid\fP ran\&. The CPU-set \fCset\fP (previously allocated by the caller) is filled with the PU which the thread last ran on\&.
.PP
\fBReturns\fP
.RS 4
0 on success, -1 on error\&.
.RE
.PP
\fBNote\fP
.RS 4
This is equivalent to calling \fBhwloc_get_proc_last_cpu_location()\fP with \fBHWLOC_CPUBIND_THREAD\fP as flags\&. 
.RE
.PP

.SS "int hwloc_linux_read_path_as_cpumask (const char * path, \fBhwloc_bitmap_t\fP set)"

.PP
Convert a linux kernel cpumask file \fCpath\fP into a hwloc bitmap \fCset\fP\&. Might be used when reading CPU set from sysfs attributes such as topology and caches for processors, or local_cpus for devices\&.
.PP
\fBReturns\fP
.RS 4
0 on success, -1 on error\&.
.RE
.PP
\fBNote\fP
.RS 4
This function ignores the HWLOC_FSROOT environment variable\&. 
.RE
.PP

.SS "int hwloc_linux_set_tid_cpubind (\fBhwloc_topology_t\fP topology, pid_t tid, \fBhwloc_const_cpuset_t\fP set)"

.PP
Bind a thread \fCtid\fP on cpus given in cpuset \fCset\fP\&. The behavior is exactly the same as the Linux sched_setaffinity system call, but uses a hwloc cpuset\&.
.PP
\fBReturns\fP
.RS 4
0 on success, -1 on error\&.
.RE
.PP
\fBNote\fP
.RS 4
This is equivalent to calling \fBhwloc_set_proc_cpubind()\fP with HWLOC_CPUBIND_THREAD as flags\&. 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.