Print this page
10057 Man page misspellings ouput particuliar overriden
Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3lgrp/lgrp_affinity_get.3lgrp
+++ new/usr/src/man/man3lgrp/lgrp_affinity_get.3lgrp
1 1 '\" te
2 2 .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
3 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 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 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 6 .TH LGRP_AFFINITY_GET 3LGRP "Apr 16, 2003"
7 7 .SH NAME
8 8 lgrp_affinity_get, lgrp_affinity_set \- get of set lgroup affinity
9 9 .SH SYNOPSIS
10 10 .LP
11 11 .nf
12 12 cc [ \fIflag \&.\|.\|.\fR ] \fIfile\fR\&.\|.\|. \fB-llgrp\fR [ \fIlibrary \&.\|.\|.\fR ]
13 13 #include <sys/lgrp_user.h>
14 14
15 15 \fBlgrp_affinity_t\fR \fBlgrp_affinity_get\fR(\fBidtype_t\fR \fIidtype\fR, \fBid_t\fR \fIid\fR,
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
16 16 \fBlgrp_id_t\fR \fIlgrp\fR);
17 17 .fi
18 18
19 19 .LP
20 20 .nf
21 21 \fBint\fR \fBlgrp_affinity_set\fR(\fBidtype_t\fR \fIidtype\fR, \fBid_t\fR \fIid\fR, \fBlgrp_id_t\fR \fIlgrp\fR,
22 22 \fBlgrp_affinity_t\fR \fIaffinity\fR);
23 23 .fi
24 24
25 25 .SH DESCRIPTION
26 -.sp
27 26 .LP
28 27 The \fBlgrp_affinity_get()\fR function returns the affinity that the LWP or set
29 28 of LWPs specified by the \fIidtype\fR and \fIid\fR arguments have for the given
30 29 lgroup.
31 30 .sp
32 31 .LP
33 32 The \fBlgrp_affinity_set()\fR function sets the affinity that the LWP or set of
34 33 LWPs specified by \fIidtype\fR and \fIid\fR have for the given lgroup. The
35 34 lgroup affinity can be set to \fBLGRP_AFF_STRONG\fR, \fBLGRP_AFF_WEAK\fR, or
36 35 \fBLGRP_AFF_NONE\fR.
37 36 .sp
38 37 .LP
39 38 If the \fIidtype\fR is \fBP_PID\fR, the affinity is retrieved for one of the
40 39 LWPs in the process or set for all the LWPs of the process with process ID
41 40 (PID) \fIid\fR. The affinity is retrieved or set for the LWP of the current
42 41 process with LWP ID \fIid\fR if \fIidtype\fR is \fBP_LWPID\fR. If \fIid\fR is
43 42 \fBP_MYID\fR, then the current LWP or process is specified.
44 43 .sp
45 44 .LP
46 45 The operating system uses the lgroup affinities as advice on where to run a
47 46 thread and allocate its memory and factors this advice in with other
48 47 constraints. Processor binding and processor sets can restrict which lgroups a
49 48 thread can run on, but do not change the lgroup affinities.
50 49 .sp
51 50 .LP
52 51 Each thread can have an affinity for an lgroup in the system such that the
53 52 thread will tend to be scheduled to run on that lgroup and allocate memory from
54 53 there whenever possible. If the thread has affinity for more than one lgroup,
↓ open down ↓ |
18 lines elided |
↑ open up ↑ |
55 54 the operating system will try to run the thread and allocate its memory on the
56 55 lgroup for which it has the strongest affinity, then the next strongest, and so
57 56 on up through some small, system-dependent number of these lgroup affinities.
58 57 When multiple lgroups have the same affinity, the order of preference among
59 58 them is unspecified and up to the operating system to choose. The lgroup with
60 59 the strongest affinity that the thread can run on is known as its "home lgroup"
61 60 (see \fBlgrp_home\fR(3LGRP)) and is usually the operating system's first choice
62 61 of where to run the thread and allocate its memory.
63 62 .sp
64 63 .LP
65 - There are different levels of affinity that can be specified by a thread for a
66 -particuliar lgroup. The levels of affinity are the following from strongest to
64 +There are different levels of affinity that can be specified by a thread for a
65 +particular lgroup. The levels of affinity are the following from strongest to
67 66 weakest:
68 67 .sp
69 68 .in +2
70 69 .nf
71 70 LGRP_AFF_STRONG /* strong affinity */
72 71 LGRP_AFF_WEAK /* weak affinity */
73 72 LGRP_AFF_NONE /* no affinity */
74 73 .fi
75 74 .in -2
76 75
77 76 .sp
78 77 .LP
79 78 The \fBLGRP_AFF_STRONG\fR affinity serves as a hint to the operating system
80 79 that the calling thread has a strong affinity for the given lgroup. If this is
81 80 the thread's home lgroup, the operating system will avoid rehoming it to
82 81 another lgroup if possible. However, dynamic reconfiguration, processor
83 82 offlining, processor binding, and processor set binding and manipulation are
84 83 examples of events that can cause the operating system to change the thread's
85 84 home lgroup for which it has a strong affinity.
86 85 .sp
87 86 .LP
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
88 87 The \fBLGRP_AFF_WEAK\fR affinity is a hint to the operating system that the
89 88 calling thread has a weak affinity for the given lgroup. If a thread has a
90 89 weak affinity for its home lgroup, the operating system interpets this to mean
91 90 that thread does not mind whether it is rehomed, unlike \fBLGRP_AFF_STRONG\fR.
92 91 Load balancing, dynamic reconfiguration, processor binding, or processor set
93 92 binding and manipulation are examples of events that can cause the operating
94 93 system to change a thread's home lgroup for which it has a weak affinity.
95 94 .sp
96 95 .LP
97 96 The \fBLGRP_AFF_NONE\fR affinity signifies no affinity and can be used to
98 -remove a thread's affinity for a particuliar lgroup. Initially, each thread
97 +remove a thread's affinity for a particular lgroup. Initially, each thread
99 98 has no affinity to any lgroup. If a thread has no lgroup affinities set, the
100 99 operating system chooses a home lgroup for the thread with no affinity set.
101 100 .SH RETURN VALUES
102 -.sp
103 101 .LP
104 102 Upon successful completion, \fBlgrp_affinity_get()\fR returns the affinity for
105 103 the given lgroup.
106 104 .sp
107 105 .LP
108 106 Upon successful completion, \fBlgrp_affinity_set()\fR return 0.
109 107 .sp
110 108 .LP
111 109 Otherwise, both functions return \(mi1 and set \fBerrno\fR to indicate the
112 110 error.
113 111 .SH ERRORS
114 -.sp
115 112 .LP
116 113 The \fBlgrp_affinity_get()\fR and \fBlgrp_affinity_set()\fR functions will fail
117 114 if:
118 115 .sp
119 116 .ne 2
120 117 .na
121 118 \fB\fBEINVAL\fR\fR
122 119 .ad
123 120 .RS 10n
124 121 The specified lgroup, affinity, or ID type is not valid.
125 122 .RE
126 123
127 124 .sp
128 125 .ne 2
129 126 .na
130 127 \fB\fBEPERM\fR\fR
131 128 .ad
132 129 .RS 10n
133 130 The effective user of the calling process does not have appropriate privileges,
134 131 and its real or effective user ID does not match the real or effective user ID
135 132 of one of the LWPs.
136 133 .RE
137 134
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
138 135 .sp
139 136 .ne 2
140 137 .na
141 138 \fB\fBESRCH\fR\fR
142 139 .ad
143 140 .RS 10n
144 141 The specified lgroup or LWP(s) was not found.
145 142 .RE
146 143
147 144 .SH ATTRIBUTES
148 -.sp
149 145 .LP
150 146 See \fBattributes\fR(5) for descriptions of the following attributes:
151 147 .sp
152 148
153 149 .sp
154 150 .TS
155 151 box;
156 152 c | c
157 153 l | l .
158 154 ATTRIBUTE TYPE ATTRIBUTE VALUE
159 155 _
160 156 Interface Stability Evolving
161 157 _
162 158 MT-Level MT-Safe
163 159 .TE
164 160
165 161 .SH SEE ALSO
166 -.sp
167 162 .LP
168 163 \fBlgrp_home\fR(3LGRP), \fBliblgrp\fR(3LIB), \fBattributes\fR(5)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX