Wed Jan 28 23:44:45 2009 UTC ()
Try to clarify what pset(3) actually does.  This needs some more
work.


(dyoung)
diff -r1.8 -r1.9 src/lib/librt/pset.3

cvs diff -r1.8 -r1.9 src/lib/librt/pset.3 (expand / switch to unified diff)

--- src/lib/librt/pset.3 2009/01/20 01:57:36 1.8
+++ src/lib/librt/pset.3 2009/01/28 23:44:45 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: pset.3,v 1.8 2009/01/20 01:57:36 rmind Exp $ 1.\" $NetBSD: pset.3,v 1.9 2009/01/28 23:44:45 dyoung Exp $
2.\" 2.\"
3.\" Copyright (c) 2008 The NetBSD Foundation, Inc. 3.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Mindaugas Rasiukevicius <rmind at NetBSD org>. 7.\" by Mindaugas Rasiukevicius <rmind at NetBSD org>.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
@@ -17,48 +17,51 @@ @@ -17,48 +17,51 @@
17.\" 17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE. 28.\" POSSIBILITY OF SUCH DAMAGE.
29.\" 29.\"
30.Dd October 18, 2008 30.Dd January 28, 2009
31.Dt PSET 3 31.Dt PSET 3
32.Os 32.Os
33.Sh NAME 33.Sh NAME
34.Nm pset_create , 34.Nm pset_create ,
35.Nm pset_assign , 35.Nm pset_assign ,
36.Nm pset_bind , 36.Nm pset_bind ,
37.Nm pset_destroy 37.Nm pset_destroy
38.Nd processor sets 38.Nd processor sets
39.Sh SYNOPSIS 39.Sh SYNOPSIS
40.In sys/pset.h 40.In sys/pset.h
41.Ft int 41.Ft int
42.Fn pset_create "psetid_t *psid" 42.Fn pset_create "psetid_t *psid"
43.Ft int 43.Ft int
44.Fn pset_assign "psetid_t psid" "cpuid_t cpuid" "psetid_t *opsid" 44.Fn pset_assign "psetid_t psid" "cpuid_t cpuid" "psetid_t *opsid"
45.Ft int 45.Ft int
46.Fn pset_bind "psetid_t psid" "idtype_t type" "id_t id" "psetid_t *opsid" 46.Fn pset_bind "psetid_t psid" "idtype_t type" "id_t id" "psetid_t *opsid"
47.Ft int 47.Ft int
48.Fn pset_destroy "psetid_t psid" 48.Fn pset_destroy "psetid_t psid"
49.Sh DESCRIPTION 49.Sh DESCRIPTION
50The processor sets API provides the possibility to bind processes or 50The processor sets API provides the possibility to exclusively
51threads to specific processors or groups of processors. 51dedicate specific processors or groups of processors to processes
 52or threads.
 53After processes or threads are bound to a group of processors by
 54the API, the group henceforth runs only those processors or threads.
52This section describes the functions used to control processor sets. 55This section describes the functions used to control processor sets.
53.Ss FUNCTIONS 56.Ss FUNCTIONS
54.Bl -tag -width compact 57.Bl -tag -width compact
55.It Fn pset_create psid 58.It Fn pset_create psid
56Creates a processor set, and returns its ID into 59Creates a processor set, and returns its ID into
57.Fa psid . 60.Fa psid .
58.It Fn pset_assign psid cpu opsid 61.It Fn pset_assign psid cpu opsid
59Assigns the processor specified by 62Assigns the processor specified by
60.Fa cpuid 63.Fa cpuid
61to the processor set specified by 64to the processor set specified by
62.Fa psid . 65.Fa psid .
63Stores the current processor set ID of the processor or 66Stores the current processor set ID of the processor or
64.Dv PS_NONE 67.Dv PS_NONE
@@ -79,30 +82,30 @@ If @@ -79,30 +82,30 @@ If
79.Fa psid 82.Fa psid
80is set to 83is set to
81.Dv PS_MYID , 84.Dv PS_MYID ,
82then the processor set ID of the calling process will be used, and 85then the processor set ID of the calling process will be used, and
83.Fa psid 86.Fa psid
84will be ignored. 87will be ignored.
85.Pp 88.Pp
86If 89If
87.Fa psid 90.Fa psid
88is set to 91is set to
89.Dv PS_NONE , 92.Dv PS_NONE ,
90any assignment to the processor will be cleared. 93any assignment to the processor will be cleared.
91.It Fn pset_bind psid type id opsid 94.It Fn pset_bind psid type id opsid
92Binds the target specified by 95Dedicates the processor set specified by
93.Fa id 96.Fa psid
94to the processor set specified by 97to the target specified by
95.Fa psid . 98.Fa id .
96The current processor set ID to which the target is bound or 99The current processor set ID to which the target is bound or
97.Dv PS_NONE 100.Dv PS_NONE
98will be returned in 101will be returned in
99.Fa opsid , 102.Fa opsid ,
100if the pointer is not 103if the pointer is not
101.Dv NULL . 104.Dv NULL .
102.Nx 105.Nx
103supports the following types of targets specified by 106supports the following types of targets specified by
104.Fa type : 107.Fa type :
105.Bl -tag -width P_PID 108.Bl -tag -width P_PID
106.It Dv P_PID 109.It Dv P_PID
107Process identified by the PID. 110Process identified by the PID.
108.It Dv P_LWPID 111.It Dv P_LWPID