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 30, 2018 | .Dd April 1, 2021 | ||||
.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 * | .Ft struct domainset * | ||||
.Fn DOMAINSET_FIXED domain | .Fn DOMAINSET_FIXED domain | ||||
.Ft struct domainset * | .Ft struct domainset * | ||||
.Fn DOMAINSET_FT | |||||
.Ft struct domainset * | |||||
.Fn DOMAINSET_IL | |||||
.Ft struct domainset * | |||||
.Fn DOMAINSET_RR | .Fn DOMAINSET_RR | ||||
.Ft struct domainset * | .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 | ||||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
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_FIXED , | ||||
.Fn DOMAINSET_FT , | |||||
.Fn DOMAINSET_IL , | |||||
.Fn DOMAINSET_RR | .Fn DOMAINSET_RR | ||||
and | and | ||||
.Fn DOMAINSET_PREF | .Fn DOMAINSET_PREF | ||||
macros 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 | .Fn DOMAINSET_FIXED | ||||
is a policy which only permits allocations from the specified domain. | is a policy which only permits allocations from the specified domain. | ||||
.Fn DOMAINSET_FT | |||||
is a policy which attempts to allocate memory local to the current CPU, | |||||
falling back to a round-robin policy if the initial allocation fails. | |||||
.Fn DOMAINSET_IL | |||||
and | |||||
.Fn DOMAINSET_RR | .Fn DOMAINSET_RR | ||||
provides round-robin selection among all domains in the system. | provide round-robin selection among all domains in the system, corresponding | ||||
to the | |||||
.Dv DOMAINSET_POLICY_INTERLEAVE | |||||
and | |||||
.Dv DOMAINSET_POLICY_ROUNDROBIN | |||||
policies, respectively. | |||||
The | The | ||||
.Fn DOMAINSET_PREF | .Fn DOMAINSET_PREF | ||||
policies attempt allocation from the specified domain, but unlike | policies attempt allocation from the specified domain, but unlike | ||||
.Fn DOMAINSET_FIXED | .Fn DOMAINSET_FIXED | ||||
will fall back to other domains to satisfy the request. | will fall back to other domains to satisfy the request. | ||||
These policies should be used in preference to | These policies should be used in preference to | ||||
.Fn DOMAINSET_FIXED | .Fn DOMAINSET_FIXED | ||||
to avoid blocking indefinitely on a | to avoid blocking indefinitely on a | ||||
Show All 28 Lines |