1 .\" Copyright (c) 2015 Adrian Chadd <adrian@FreeBSD.org>
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd Non-Uniform Memory Access
38 Non-Uniform Memory Access is a computer architecture design which
39 involves unequal costs between processors, memory and IO devices
44 architecture, the latency to access specific memory or IO devices
45 depends upon which processor the memory or device is attached to.
46 Accessing memory local to a processor is faster than accessing memory
47 that is connected to one of the other processors.
49 implements NUMA-aware memory allocation policies.
50 By default it attempts to ensure that allocations are balanced across
52 Users may override the default domain selection policy using
56 support is enabled when the
58 option is specified in the kernel configuration file.
59 Each platform defines the
61 constant, which specifies the maximum number of supported NUMA domains.
62 This constant may be specified in the kernel configuration file.
64 support can be disabled at boot time by setting the
67 Other values for this tunable are currently ignored.
71 policies are controlled with the
72 .Xr cpuset_getdomain 2
74 .Xr cpuset_setdomain 2
78 tool is available for starting processes with a non-default
79 policy, or to change the policy of an existing thread or process.
82 for information about CPU to domain mapping.
84 Systems with non-uniform access to I/O devices may mark those devices
85 with the local VM domain identifier.
86 Drivers can find out their local domain information by calling
87 .Xr bus_get_domain 9 .
91 is controlled and exposes information with these
95 .Bl -tag -width indent -compact
97 The number of VM domains which have been detected.
99 .It Va vm.phys_locality
100 A table indicating the relative cost of each VM domain to each other.
101 A value of 10 indicates equal cost.
102 A value of -1 means the locality map is not available or no
103 locality information is available.
106 The map of physical memory, grouped by VM domain.
108 .Sh IMPLEMENTATION NOTES
111 implementation is VM-focused.
114 domains are mapped into a contiguous, non-sparse
115 VM domain space, starting from 0.
116 Thus, VM domain information (for example, the domain identifier) is not
117 necessarily the same as is found in the hardware specific information.
118 Policy information is available in both struct thread and struct proc.
121 .Xr cpuset_getaffinity 2 ,
122 .Xr cpuset_setaffinity 2 ,
129 as a first-touch allocation policy with a fail-over to round-robin allocation
130 and was not configurable.
131 It was then modified in
133 to implement a round-robin allocation policy and was also not configurable.
136 .Xr numa_getaffinity 2
138 .Xr numa_setaffinity 2
141 tool first appeared in
145 The current implementation appeared in
149 This manual page written by
150 .An Adrian Chadd Aq Mt adrian@FreeBSD.org .
152 No statistics are kept to indicate how often
154 allocation policies succeed or fail.