Changeset View
Changeset View
Standalone View
Standalone View
share/man/man9/domainset.9
| Show All 16 Lines | |||||||||||
| .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||||||||||
| .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||||||||||
| .\" 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. | ||||||||||
| .\" | .\" | ||||||||||
| .Dd April 14, 2021 | .Dd June 24, 2025 | ||||||||||
markjUnsubmitted Done Inline Actions
markj: | |||||||||||
| .Dt DOMAINSET 9 | .Dt DOMAINSET 9 | ||||||||||
| .Os | .Os | ||||||||||
| .Sh NAME | .Sh NAME | ||||||||||
| .Nm domainset(9) | .Nm domainset(9) | ||||||||||
Not Done Inline Actions
Right? ziaee: Right? | |||||||||||
| .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; | ||||||||||
| Show All 11 Lines | |||||||||||
| .Fn DOMAINSET_IL | .Fn DOMAINSET_IL | ||||||||||
| .Ft struct domainset * | .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 domainset_populate "struct domainset *domain" "domainset_t *mask" "int policy" "size_t mask_size" | |||||||||||
| .Ft int | |||||||||||
| .Fn sysctl_handle_domainset "SYSCTL_HANDLER_ARGS" | .Fn sysctl_handle_domainset "SYSCTL_HANDLER_ARGS" | ||||||||||
| .Sh DESCRIPTION | .Sh DESCRIPTION | ||||||||||
| The | The | ||||||||||
| .Nm | .Nm | ||||||||||
| API provides memory domain allocation policy for NUMA machines. | API provides memory domain allocation policy for NUMA machines. | ||||||||||
| Each | Each | ||||||||||
| .Vt domainset | .Vt domainset | ||||||||||
| contains a bitmask of allowed domains, an integer policy, and an optional | contains a bitmask of allowed domains, an integer policy, and an optional | ||||||||||
| ▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||||||||
| 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 | ||||||||||
| .Dv M_WAITOK | .Dv M_WAITOK | ||||||||||
| request. | request. | ||||||||||
| .Pp | |||||||||||
| 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 domainset | .Vt domainset | ||||||||||
| is an immutable type that is shared among all matching keys and must | is an immutable type that is shared among all matching keys and must | ||||||||||
| not be modified after return. | not be modified after return. | ||||||||||
| .Pp | |||||||||||
| The | |||||||||||
| .Fn domainset_populate | |||||||||||
| function fills a | |||||||||||
| .Vt domainset | |||||||||||
| struct using a domain mask and policy. | |||||||||||
Done Inline Actions
markj: | |||||||||||
| It is used for validating and | |||||||||||
| translating a domain mask and policy into a | |||||||||||
| .Vt domainset | |||||||||||
| struct when creating a custom domainset using | |||||||||||
Done Inline Actions
markj: | |||||||||||
| .Vt domainset_create . | |||||||||||
| .Pp | .Pp | ||||||||||
| The | The | ||||||||||
| .Fn sysctl_handle_domainset | .Fn sysctl_handle_domainset | ||||||||||
| function is provided as a convenience for modifying or viewing domainsets | function is provided as a convenience for modifying or viewing domainsets | ||||||||||
| that are not accessible via | that are not accessible via | ||||||||||
| .Xr cpuset 2 . | .Xr cpuset 2 . | ||||||||||
| It is intended for use with | It is intended for use with | ||||||||||
| .Xr sysctl 9 . | .Xr sysctl 9 . | ||||||||||
| Show All 9 Lines | |||||||||||