2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PSET_CREATE 2 "Feb 22, 2008"
8 pset_create, pset_destroy, pset_assign \- manage sets of processors
14 \fBint\fR \fBpset_create\fR(\fBpsetid_t *\fR\fInewpset\fR);
19 \fBint\fR \fBpset_destroy\fR(\fBpsetid_t\fR \fIpset\fR);
24 \fBint\fR \fBpset_assign\fR(\fBpsetid_t\fR \fIpset\fR, \fBprocessorid_t\fR \fIcpu\fR, \fBpsetid_t *\fR\fIopset\fR);
30 These functions control the creation and management of sets of processors.
31 Processor sets allow a subset of the system's processors to be set aside for
32 exclusive use by specified \fBLWP\fRs and processes. The binding of \fBLWP\fRs
33 and processes to processor sets is controlled by \fBpset_bind\fR(2).
36 The \fBpset_create()\fR function creates an empty processor set that contains
37 no processors. On successful return, \fInewpset\fR will contain the \fBID\fR
38 of the new processor set.
41 The \fBpset_destroy()\fR function destroys the processor set \fIpset\fR,
42 releasing its constituent processors and processes. If \fIpset\fR is
43 \fBPS_MYID\fR, the processor set to which the caller is bound is destroyed.
46 The \fBpset_assign()\fR function assigns the processor \fIcpu\fR to the
47 processor set \fIpset\fR. A processor that has been assigned to a processor set
48 will run only \fBLWP\fRs and processes that have been explicitly bound to that
49 processor set, unless another \fBLWP\fR requires a resource that is only
50 available on that processor.
53 On successful return, if \fIopset\fR is non-null, \fIopset\fR will contain the
54 processor set \fBID\fR of the former processor set of the processor.
57 If \fIpset\fR is \fBPS_NONE\fR, \fBpset_assign()\fR releases processor
58 \fIcpu\fR from its current processor set.
61 If \fIpset\fR is \fBPS_QUERY\fR, \fBpset_assign()\fR makes no change to
62 processor sets, but returns the current processor set \fBID\fR of processor
63 \fIcpu\fR in \fIopset\fR.
66 If \fIpset\fR is \fBPS_MYID\fR, processor \fIcpu\fR is assigned to the
67 processor set to which the caller belongs. If the caller does not belong to a
68 processor set, processor \fIcpu\fR is released from its current processor set.
71 These functions are restricted to privileged processes, except for
72 \fBpset_assign()\fR when \fIpset\fR is \fBPS_QUERY\fR.
76 Upon successful completion, these functions return \fB0\fR. Otherwise,
77 \fB\(mi1\fR is returned and \fBerrno\fR is set to indicate the error.
81 These functions will fail if:
88 The processor could not be moved to the specified processor set.
97 The location pointed to by \fInewpset\fR was not writable by the user, or the
98 location pointed to by \fIopset\fR was not \fINULL\fR and not writable by the
108 The specified processor does not exist, the specified processor is not
109 on-line, or an invalid processor set was specified.
118 There was insufficient space for \fBpset_create\fR to create a new processor
128 The pools facility is active. See \fBpooladm\fR(1M) and
129 \fBpool_set_status\fR(3POOL) for information about enabling and disabling the
139 The {\fBPRIV_SYS_RES_CONFIG\fR} privilege is not asserted in the effective set
140 of the calling process.
146 See \fBattributes\fR(5) for descriptions of the following attributes:
154 ATTRIBUTE TYPE ATTRIBUTE VALUE
156 Interface Stability Committed
158 MT-Level Async-Signal-Safe
164 \fBpooladm\fR(1M), \fBpsradm\fR(1M), \fBpsrinfo\fR(1M), \fBpsrset\fR(1M),
165 \fBp_online\fR(2), \fBprocessor_bind\fR(2), \fBpset_bind\fR(2),
166 \fBpset_info\fR(2), \fBpool_set_status\fR(3POOL), \fBpset_getloadavg\fR(3C),
167 \fBattributes\fR(5), \fBprivileges\fR(5)
171 The processor set type of \fBPS_SYSTEM\fR is no longer supported.
174 Processors with \fBLWP\fRs bound to them using \fBprocessor_bind\fR(2) cannot
175 be assigned to a new processor set. If this is attempted, \fBpset_assign()\fR
176 will fail and set \fBerrno\fR to \fBEBUSY\fR.