Improve processor_bind(2) EINVAL description
processor_bind(2) manual states the following under the
EINVAL The specified processor is not on-line, or the idtype argument was not P_PID, P_LWPID, P_PROJID, P_TASKID, P_CTID, or P_ZONEID. The caller is in a non-global zone, the pools facility is active, and the processor is not a member of the zone's pool's processor set.
This second paragraph is incorrect. If the LWP is a member of a partition (processor set or resource pool) then the processor bound to must be a member of the partition. Otherwise,
EINVAL is returned. This is verified both by experimentation and by the code.
# psrinfo -vp The physical processor has 6 cores and 12 virtual processors (0-11) The core has 2 virtual processors (0-1) The core has 2 virtual processors (2-3) The core has 2 virtual processors (4-5) The core has 2 virtual processors (6-7) The core has 2 virtual processors (8-9) The core has 2 virtual processors (10-11) x86 (GenuineIntel 206D7 family 6 model 45 step 7 clock 3500 MHz) Intel(r) Core(tm) i7-3970X CPU @ 3.50GHz # psrset -c 0 1 created processor set 1 processor 0: was not assigned, now 1 processor 1: was not assigned, now 1 # psrset -b 1 $$ process id 74611: was not bound, now 1 # psrset -q $$ process id 74611: 1 # pbind -b 2 $$ pbind: cannot bind pid 74611: Invalid argument # truss -t processor_bind pbind -b 2 $$ processor_bind(P_PID, 74611, 2, 0xFFFFFD7FFFDFFB58) Err#22 EINVAL pbind: cannot bind pid 74611: Invalid argument
Updated by Electric Monk almost 5 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 43b03420337dfd6b23d347fb1a237f0554fcde98 Author: Ryan Zezeski <firstname.lastname@example.org> Date: 2015-12-28T21:59:03.000Z 6534 Improve processor_bind(2) EINVAL description Reviewed by: Richard Lowe <email@example.com> Reviewed by: Garrett D'Amore <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>