Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man9/zone.9
Show All 19 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd February 4, 2020 | .Dd August 3, 2020 | ||||
.Dt UMA 9 | .Dt UMA 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm UMA | .Nm UMA | ||||
.Nd general-purpose kernel object allocator | .Nd general-purpose kernel object allocator | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In sys/param.h | .In sys/param.h | ||||
.In sys/queue.h | .In sys/queue.h | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
.Fn uma_zalloc_pcpu "uma_zone_t zone" "int flags" | .Fn uma_zalloc_pcpu "uma_zone_t zone" "int flags" | ||||
.Ft "void *" | .Ft "void *" | ||||
.Fn uma_zalloc_pcpu_arg "uma_zone_t zone" "void *arg" "int flags" | .Fn uma_zalloc_pcpu_arg "uma_zone_t zone" "void *arg" "int flags" | ||||
.Ft void | .Ft void | ||||
.Fn uma_zfree "uma_zone_t zone" "void *item" | .Fn uma_zfree "uma_zone_t zone" "void *item" | ||||
.Ft void | .Ft void | ||||
.Fn uma_zfree_arg "uma_zone_t zone" "void *item" "void *arg" | .Fn uma_zfree_arg "uma_zone_t zone" "void *item" "void *arg" | ||||
.Ft void | .Ft void | ||||
.Fn uma_zfree_domain "uma_zone_t zone" "void *item" "void *arg" | |||||
.Ft void | |||||
.Fn uma_zfree_pcpu "uma_zone_t zone" "void *item" | .Fn uma_zfree_pcpu "uma_zone_t zone" "void *item" | ||||
.Ft void | .Ft void | ||||
.Fn uma_zfree_pcpu_arg "uma_zone_t zone" "void *item" "void *arg" | .Fn uma_zfree_pcpu_arg "uma_zone_t zone" "void *item" "void *arg" | ||||
.Ft void | .Ft void | ||||
.Fn uma_prealloc "uma_zone_t zone" "int nitems" | .Fn uma_prealloc "uma_zone_t zone" "int nitems" | ||||
.Ft void | .Ft void | ||||
.Fn uma_zone_reserve "uma_zone_t zone" "int nitems" | .Fn uma_zone_reserve "uma_zone_t zone" "int nitems" | ||||
.Ft void | .Ft void | ||||
▲ Show 20 Lines • Show All 290 Lines • ▼ Show 20 Lines | |||||
functions of the zone, respectively. | functions of the zone, respectively. | ||||
The | The | ||||
.Fn uma_zalloc_domain | .Fn uma_zalloc_domain | ||||
function allows callers to specify a fixed | function allows callers to specify a fixed | ||||
.Xr numa 4 | .Xr numa 4 | ||||
domain to allocate from. | domain to allocate from. | ||||
This uses a guaranteed but slow path in the allocator which reduces | This uses a guaranteed but slow path in the allocator which reduces | ||||
concurrency. | concurrency. | ||||
The | |||||
.Fn uma_zfree_domain | |||||
function should be used to return memory allocated in this fashion. | |||||
This function infers the domain from the pointer and does not require it as an | |||||
argument. | |||||
.Pp | .Pp | ||||
The | The | ||||
.Fn uma_zone_prealloc | .Fn uma_zone_prealloc | ||||
function allocates slabs for the requested number of items, typically following | function allocates slabs for the requested number of items, typically following | ||||
the initial creation of a zone. | the initial creation of a zone. | ||||
Subsequent allocations from the zone will be satisfied using the pre-allocated | Subsequent allocations from the zone will be satisfied using the pre-allocated | ||||
slabs. | slabs. | ||||
Note that slab allocation is performed with the | Note that slab allocation is performed with the | ||||
▲ Show 20 Lines • Show All 189 Lines • Show Last 20 Lines |