Changeset View
Changeset View
Standalone View
Standalone View
share/man/man9/domainset.9
Show All 18 Lines | |||||
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||||
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
.\" POSSIBILITY OF SUCH DAMAGE. | .\" POSSIBILITY OF SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd October 20, 2018 | .Dd October 28, 2018 | ||||
.Dt DOMAINSET 9 | .Dt DOMAINSET 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm domainset(9) | .Nm domainset(9) | ||||
.Nd domainset functions and operation | .Nd domainset functions and operation | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In sys/_domainset.h | .In sys/_domainset.h | ||||
.In sys/domainset.h | .In sys/domainset.h | ||||
.\" | .\" | ||||
.Bd -literal -offset indent | .Bd -literal -offset indent | ||||
struct domainset { | struct domainset { | ||||
domainset_t ds_mask; | domainset_t ds_mask; | ||||
uint16_t ds_policy; | uint16_t ds_policy; | ||||
domainid_t ds_prefer; | domainid_t ds_prefer; | ||||
... | ... | ||||
}; | }; | ||||
.Ed | .Ed | ||||
.Pp | .Pp | ||||
.Ft struct domainset * | |||||
.Fn DOMAINSET_FIXED domain | |||||
.Ft struct domainset * | |||||
.Fn DOMAINSET_RR | .Fn DOMAINSET_RR | ||||
.Ft struct domainset * | |||||
.Fn DOMAINSET_PREF domain | .Fn DOMAINSET_PREF domain | ||||
.Ft struct domainset * | .Ft struct domainset * | ||||
.Fn domainset_create "const struct domainset *key" | .Fn domainset_create "const struct domainset *key" | ||||
.Ft int | .Ft int | ||||
.Fn sysctl_handle_domainset "SYSCTL_HANDLER_ARGS" | .Fn sysctl_handle_domainset "SYSCTL_HANDLER_ARGS" | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
Show All 38 Lines | |||||
the object. | the object. | ||||
The strip width is object dependent and may be as large as a | The strip width is object dependent and may be as large as a | ||||
super-page (2MB on amd64). | super-page (2MB on amd64). | ||||
This gives good distribution among memory domains while keeping system | This gives good distribution among memory domains while keeping system | ||||
efficiency higher and is preferential to round-robin for general use. | efficiency higher and is preferential to round-robin for general use. | ||||
.El | .El | ||||
.Pp | .Pp | ||||
The | The | ||||
.Fn DOMAINSET_FIXED , | |||||
.Fn DOMAINSET_RR | .Fn DOMAINSET_RR | ||||
and | and | ||||
.Fn DOMAINSET_PREF | .Fn DOMAINSET_PREF | ||||
provide pointers to global pre-defined policies for use when the | macros provide pointers to global pre-defined policies for use when the | ||||
desired policy is known at compile time. | desired policy is known at compile time. | ||||
.Fn DOMAINSET_FIXED | |||||
is a policy which only permits allocations from the specified domain. | |||||
.Fn DOMAINSET_RR | |||||
provides round-robin selection among all domains in the system. | |||||
The | |||||
.Fn DOMAINSET_PREF | |||||
policies attempt allocation from the specified domain, but unlike | |||||
.Fn DOMAINSET_FIXED | |||||
will fall back to other domains to satisfy the request. | |||||
These policies should be used in preference to | |||||
.Fn DOMAINSET_FIXED | |||||
to avoid blocking indefinitely on a | |||||
.Dv M_WAITOK | |||||
request. | |||||
The | The | ||||
.Fn domainset_create | .Fn domainset_create | ||||
function takes a partially filled in domainset as a key and returns a | function takes a partially filled in domainset as a key and returns a | ||||
valid domainset or NULL. | valid domainset or NULL. | ||||
It is critical that consumers not use domainsets that have not been | It is critical that consumers not use domainsets that have not been | ||||
returned by this function. | returned by this function. | ||||
.Vt | .Vt | ||||
domainset | domainset | ||||
Show All 20 Lines |