1
0
Files
irix-657m-src/eoe/man/man2/sysmp.2
2022-09-29 17:59:04 +03:00

356 lines
9.6 KiB
Groff

.TH sysmp 2
.SH NAME
.Op c p a
sysmp \- multiprocessing control
.Op
.Op f
sysmp, sysmp64 \- multiprocessing control
.Op
.Op c p a
.SH C SYNOPSIS
.nf
\f3#include <sys/types.h>\f1
\f3#include <sys/sysmp.h>\f1
\f3#include <sys/sysinfo.h>\f1 /* for SAGET and MINFO structures */
\f3int sysmp (int cmd, ...);\f1
\f3ptrdiff_t sysmp (int cmd, ...);"
.fi
.Op
.Op f
.nf
.fi
.SH FORTRAN SYNOPSIS
.nf
\f3integer *4 function sysmp (cmd, arg1, arg2, arg3, arg4)\f1
\f3integer *4 cmd, arg1, arg2, arg3, arg4\f1
.sp .8v
\f3integer *8 function sysmp64 (cmd, xarg1, xarg2, xarg3, xarg4)\f1
\f3integer *4 cmd\f1
\f3integer *4 xarg1, xarg4\f1
\f3integer *8 xarg2, xarg3\f1
\f3 - exceptions: when cmd is MP_STAT: xarg1 is integer*8\f1
\f3 - exceptions: when cmd is MP_PSET: xarg2 is integer*4\f1
.fi
.Op
.SH DESCRIPTION
\f4sysmp\fP provides control/information for miscellaneous system services.
This system call is usually used by system programs
and is not intended for general use.
The arguments \f2arg1\fP, \f2arg2\fP, \f2arg3\fP, \f2arg4\fP
are provided for command-dependent use.
.PP
As specified by \f2cmd\fP,
the following commands are available:
.PP
.nf
.B MP_CLEARCFSSTAT
.B MP_CLEARNFSSTAT
.B MP_NUMA_GETCPUNODEMAP
.fi
.PD 0
.TP 15
.B MP_NUMA_GETDISTMATRIX
These are all interfaces that are used to implement various
system library functions. They are all subject to change and
should not be called directly by applications.
.sp .8v
.PP
.PD 1
.TP 15
.B MP_PGSIZE
The page size of the system is returned (see
\f4getpagesize\fP(2)).
.TP
.B MP_SCHED
Interface for the \f4schedctl\fP(2) system call.
.TP
.B MP_NPROCS
Returns the number of processors physically configured.
.TP
.B MP_NAPROCS
Returns the number of processors that are available to schedule
unrestricted processes.
.TP
.B MP_STAT
The processor ids and status flag bits of the physically configured processors
are copied into an array of
.I pda_stat
structures to which
.I arg1
points.
The array must be large enough to hold as many
.I pda_stat
structures as the number of processors returned by the
.B MP_NPROCS
\f4sysmp\fP command.
The
.I pda_stat
structure and the various status bits are defined in
.I <sys/pda.h>.
.TP
.B MP_EMPOWER
The processor number given by \f2arg1\fP, interpreted as an 'int',
is empowered to run any unrestricted processes.
This is the default for all processors.
This command requires superuser authority.
.TP
.B MP_RESTRICT
The processor number given by \f2arg1\fP, interpreted as an 'int',
is restricted from running any
processes except those assigned to it by a
.B MP_MUSTRUN
or
.B MP_MUSTRUN_PID
command,
a
\f4runon\fP(1)
command or because of hardware necessity.
Note that processor 0 cannot be restricted.
This command requires superuser authority.
On Challenge Series machines, all timers belonging
to the processor are moved to the
processor that owns the clock as reported by
.B MP_CLOCK.
.TP
.B MP_ISOLATE
The processor number given by \f2arg1\fP, interpreted as an 'int',
is isolated from running any
processes except those assigned to it by a
.B MP_MUSTRUN
command, a \f4runon\fP(1)
command or because of hardware necessity.
Instruction cache
and Translation Lookaside Buffer synchronization across processors in
the system is minimized or delayed on an isolated processor until
system services are requested. Note that processor 0 cannot be isolated.
This command requires superuser authority.
On Challenge Series machines, all timers belonging
to the processor are moved to the
processor that owns the clock as reported by
.B MP_CLOCK.
.TP
.B MP_UNISOLATE
The processor number given by \f2arg1\fP, interpreted as an 'int',
is unisolated and empowered
to run any unrestricted processes.
This is the default system configuration for all processors.
This command requires superuser authority.
.TP
.B MP_PREEMPTIVE
The processor number given by \f2arg1\fP, interpreted as an 'int',
has its clock scheduler enabled.
This is the default for all processors.
This command requires superuser authority.
.TP
.B MP_NONPREEMPTIVE
The processor number given by \f2arg1\fP, interpreted as an 'int',
has its clock scheduler disabled.
Normal process time slicing is no longer enforced on that processor.
As a result of turning off the clock interrupt,
the interrupt latency on this processor will be lower.
This command requires superuser authority and is allowed only
on an isolated processor.
This command is not allowed on the clock processor (see
.BR MP_CLOCK ).
.TP
.B MP_CLOCK
The processor number given by \f2arg1\fP, interpreted as an 'int',
is given charge of the operating system software clock (see
\f4timers\fP(5)).
This command requires superuser authority.
.TP
.B MP_FASTCLOCK
The processor number given by \f2arg1\fP, interpreted as an 'int',
is given charge of the operating system software fast clock (see
\f4timers\fP(5)).
This command requires superuser authority.
.PD
.PP
.nf
.B MP_MISER_GETREQUEST
.B MP_MISER_SENDREQUEST
.B MP_MISER_RESPOND
.B MP_MISER_GETRESOURCE
.B MP_MISER_SETRESOURCE
.fi
.PD 0
.TP 15
.B MP_MISER_CHECKACCESS
These are all interfaces that are used to implement various
.I miser(1)
functions. These are all subject to change and should
not be called directly by applications.
.sp .8v
.TP
.B MP_MUSTRUN
Assigns the calling process to run only on the processor number
by \f2arg1\fP, interpreted as an 'int',
except as required for communications with hardware devices.
A process that has allocated a CC sync register (see \f4ccsync\fP(7m))
is restricted to running on a particular cpu.
Attempts to reassign
such a process to another cpu will fail until the CC sync
register has been relinquished.
This command should not be used within a pthreaded application
(see \f4pthread_setrunon_np\fP(3P)).
.PD 1
.TP
.B MP_MUSTRUN_PID
Assigns the process specified by \f2arg2\fP to run only on
the processor number specified
by \f2arg1\fP, both interpreted as 'int',
except as required for communications with hardware devices.
A process that has allocated a CC sync register (see \f4ccsync\fP(7m))
is restricted to running on a particular cpu.
Attempts to reassign
such a process to another cpu will fail until the CC sync
register has been relinquished.
This command will give unpredictable results if the specified process
is a pthreaded process.
.TP
.B MP_GETMUSTRUN
Returns the processor the current process has been set to run on using
the
.B MP_MUSTRUN
command.
If the current process has not been assigned to a
specific processor, -1 is returned and
errno is set to EINVAL.
This command should not be used within a pthreaded application
(see \f4pthread_setrunon_np\fP(3P)).
.TP
.B MP_GETMUSTRUN_PID
Returns the processor that the process specified by
\f2arg1\fP has been set to run on using
the
.B MP_MUSTRUN
or
.B MP_MUSTRUN_PID
command.
If the process has not been assigned to a
specific processor, -1 is returned and
errno is set to EINVAL.
This command will give unpredictable results if the specified process
is a pthreaded process.
.TP
.B MP_RUNANYWHERE
Frees the calling process to run on whatever processor the system deems
suitable.
.TP
.B MP_RUNANYWHERE_PID
Frees the process specified by \f2arg1\fP
to run on whatever processor the system deems
suitable.
.TP
.B MP_KERNADDR
Returns the address of various kernel data structures.
The structure returned is selected by
.IR arg1 .
The list of available structures is detailed in
.IR <sys/sysmp.h> .
This option is used by many system programs to avoid having to look
in
.B /unix
for the location of the data structures.
.TP
.B MP_SASZ
Returns the size of various system accounting structures.
As above, the structure returned is governed by
.IR arg1 .
.TP
.B MP_SAGET1
Returns the contents of various system accounting structures.
The information is only for the processor specified by
.IR arg4 .
As above, the structure returned is governed by
.IR arg1 .
.I arg2
points to a buffer in the address space of the calling process and
.I arg3
specifies the maximum number of bytes to transfer.
.TP
.B MP_SAGET
Returns the contents of various system accounting structures.
The information is summed across all processors before it is returned.
As above, the structure returned is governed by
.IR arg1 .
.I arg2
points to a buffer in the address space of the calling process and
.I arg3
specifies the maximum number of bytes to transfer.
.PP
Possible errors from
\f4sysmp\fP are:
.TP 12
[EPERM]
The effective user
ID
is not superuser.
Many of the commands require superuser privilege.
.TP
[EPERM]
The user
ID
of the sending process
is not superuser, and its real or effective user
ID
does not match the real, saved, or effective user
ID
of the receiving process.
.TP
[ESRCH]
No process corresponding to that specified by a \f4MP_MUSTRUN_PID\fP,
\f4MP_GETMUSTRUN_PID\fP, or \f4MP_RUNANYWHERE_PID\fP
could be found.
.TP
[EINVAL]
The processor named
by a \f4MP_EMPOWER\fP, \f4MP_RESTRICT\fP,
\f4MP_CLOCK\fP or \f4MP_SAGET1\fP command does not exist.
.TP
[EINVAL]
The
.I cmd
argument is invalid.
.TP
[EINVAL]
The
.I arg1
argument to a \f4MP_KERNADDR\fP
command is invalid.
.TP
[EINVAL]
An attempt was made via \f4MP_MUSTRUN\fP or
\f4MP_MUSTRUN_PID\fP to move a process owning a
CC sync register from the cpu controlling the CC sync register.
.TP
[EINVAL]
The target of the \f4MP_GETMUSTRUN\fP command has not been set
to run on a specific processor.
.TP
[EINVAL]
The target process of the \f4MP_MUSTRUN_PID\fP command is a pthreaded process.
.TP
[EBUSY]
An attempt was made to restrict the only unrestricted processor
or to restrict the master processor.
.TP
[EFAULT]
An invalid buffer address has been supplied by the
calling process.
.SH "SEE ALSO"
mpadmin(1),
runon(1),
getpagesize(2),
schedctl(2),
pthread_setrunon_np(3P),
timers(5)
.SH "DIAGNOSTICS"
Upon successful completion,
the
.I cmd
dependent data is returned.
Otherwise, a value of \-1 is returned and
.I errno
is set to indicate the error.