sched_setaffinity.2: NOTES: Add paragraph on how to discover set of CPUs available on system

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-10-23 23:20:15 +02:00
parent f648d34394
commit 9c11e37c8f
1 changed files with 12 additions and 0 deletions

View File

@ -172,6 +172,18 @@ is being used.
These restrictions on the actual set of CPUs on which the thread
will run are silently imposed by the kernel.
There are various ways of determining the number of CPUs
available on the system, including: inspecting the contents of
.IR /proc/cpuinfo ;
using
.BR syconf (3)
to obtain the values of the
.BR _SC_NPROCESSORS_CONF
and
.BR _SC_NPROCESSORS_ONLN
parameters; and inspecting the list CPU directories under
.IR /sys/devices/system/cpu/ .
.BR sched (7)
has a description of the Linux scheduling scheme.
.PP