domainset.9 (e5818a53dbd212809059bb306775a4b7e0e30c5f) domainset.9 (662e7fa8d9fb296379f594ebb6a7f231c1ea8a2f)
1.\" Copyright (c) 2018 Jeffrey Roberson <jeff@FreeBSD.org>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 10 unchanged lines hidden (view full) ---

19.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23.\" POSSIBILITY OF SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
1.\" Copyright (c) 2018 Jeffrey Roberson <jeff@FreeBSD.org>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 10 unchanged lines hidden (view full) ---

19.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23.\" POSSIBILITY OF SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd March 24, 2018
27.Dd October 20, 2018
28.Dt DOMAINSET 9
29.Os
30.Sh NAME
31.Nm domainset(9)
28.Dt DOMAINSET 9
29.Os
30.Sh NAME
31.Nm domainset(9)
32\(em
33.Nm domainset_create ,
34.Nm sysctl_handle_domainset .
35.Nd domainset functions and operation
36.Sh SYNOPSIS
37.In sys/_domainset.h
38.In sys/domainset.h
39.\"
40.Bd -literal -offset indent
41struct domainset {
42 domainset_t ds_mask;
43 uint16_t ds_policy;
44 domainid_t ds_prefer;
45 ...
46};
47.Ed
48.Pp
32.Nd domainset functions and operation
33.Sh SYNOPSIS
34.In sys/_domainset.h
35.In sys/domainset.h
36.\"
37.Bd -literal -offset indent
38struct domainset {
39 domainset_t ds_mask;
40 uint16_t ds_policy;
41 domainid_t ds_prefer;
42 ...
43};
44.Ed
45.Pp
46.Fn DOMAINSET_RR
47.Fn DOMAINSET_PREF domain
49.Ft struct domainset *
50.Fn domainset_create "const struct domainset *key"
51.Ft int
52.Fn sysctl_handle_domainset "SYSCTL_HANDLER_ARGS"
53.Sh DESCRIPTION
54The
55.Nm
56API provides memory domain allocation policy for NUMA machines.

--- 37 unchanged lines hidden (view full) ---

94the object.
95The strip width is object dependent and may be as large as a
96super-page (2MB on amd64).
97This gives good distribution among memory domains while keeping system
98efficiency higher and is preferential to round-robin for general use.
99.El
100.Pp
101The
48.Ft struct domainset *
49.Fn domainset_create "const struct domainset *key"
50.Ft int
51.Fn sysctl_handle_domainset "SYSCTL_HANDLER_ARGS"
52.Sh DESCRIPTION
53The
54.Nm
55API provides memory domain allocation policy for NUMA machines.

--- 37 unchanged lines hidden (view full) ---

93the object.
94The strip width is object dependent and may be as large as a
95super-page (2MB on amd64).
96This gives good distribution among memory domains while keeping system
97efficiency higher and is preferential to round-robin for general use.
98.El
99.Pp
100The
101.Fn DOMAINSET_RR
102and
103.Fn DOMAINSET_PREF
104provide pointers to global pre-defined policies for use when the
105desired policy is known at compile time.
106The
102.Fn domainset_create
103function takes a partially filled in domainset as a key and returns a
104valid domainset or NULL.
105It is critical that consumers not use domainsets that have not been
106returned by this function.
107.Vt
108domainset
109is an immutable type that is shared among all matching keys and must

--- 19 unchanged lines hidden ---
107.Fn domainset_create
108function takes a partially filled in domainset as a key and returns a
109valid domainset or NULL.
110It is critical that consumers not use domainsets that have not been
111returned by this function.
112.Vt
113domainset
114is an immutable type that is shared among all matching keys and must

--- 19 unchanged lines hidden ---