--- old/usr/src/man/man9/vmem.9	2017-02-03 18:30:56.302299644 -0500
+++ new/usr/src/man/man9/vmem.9	2017-02-03 18:30:56.337607343 -0500
@@ -70,7 +70,7 @@
 and
 .Fn vmem_destroy
 create and destroy vmem arenas.  In order to differentiate between arenas used
-for adresses and arenas used for identifiers, the
+for addresses and arenas used for identifiers, the
 .Dv VMC_IDENTIFIER
 flag is passed to
 .Fn vmem_create .
@@ -83,7 +83,7 @@
 just one span:
 .Li "[kernelheap, ekernelheap)" .
 Spans can be added to an arena in two ways: explicitly, by
-.Fn vmem_add ,
+.Fn vmem_add ;
 or implicitly, by importing, as described in
 .Sx Imported Memory
 below.
@@ -122,11 +122,12 @@
 (the kernel heap) that provides caching for the most common slab sizes.  When
 .Sy kmem_va_arena
 runs out of virtual memory, it
-.Em imports more from the heap; we
-say that
+.Em imports
+more from the heap; we say that
 .Sy heap_arena
 is the
-.Em "vmem source" for
+.Em "vmem source"
+for
 .Sy kmem_va_arena.
 .Fn vmem_create
 allows you to specify any existing vmem arena as the source for your new
--- old/usr/src/man/man9f/vmem_add.9f	2017-02-03 18:30:57.855095038 -0500
+++ new/usr/src/man/man9f/vmem_add.9f	2017-02-03 18:30:57.889774360 -0500
@@ -35,7 +35,7 @@
 .It Fa vaddr
 The base address of the span to add.
 .It Fa size
-The size of the span to add
+The size of the span to add.
 .It Fa vmflag
 Flags affecting the allocation of the span to add.
 .El
@@ -53,7 +53,9 @@
 .Dv VM_SLEEP
 or
 .Dv VM_NOSLEEP
-must be specified, and indicate whether the addition may block.
+must be specified in
+.Fa vmflag ,
+and indicate whether the addition may block.
 .Sh CONTEXT
 This function can be called from either user or kernel context.
 If the
--- old/usr/src/man/man9f/vmem_alloc.9f	2017-02-03 18:30:59.356417546 -0500
+++ new/usr/src/man/man9f/vmem_alloc.9f	2017-02-03 18:30:59.391434746 -0500
@@ -72,7 +72,7 @@
 The allocation policy may be specified by one of the following flags:
 .Bl -tag -width Ds
 .It Dv VM_BESTFIT
-Take the segment from the smallest free segment that could satisfy this allocation
+Take the segment from the smallest free segment that could satisfy this allocation.
 .It Dv VM_FIRSTFIT
 Take the segment from the first free segment found that could satisfy this
 allocation.
@@ -89,14 +89,13 @@
 preferred.
 .El
 .Pp
-The default (un\-named) allocation policy is
-.Dq instant fit
+The default (unnamed) allocation policy is
+.Dq "instant fit" ,
 an approximation of
 .Dv VM_BESTFIT
 in guaranteed constant time.
 .It Fa align_arg
-The minimum alignment of the allocation.  If
-.Ql 0
+The minimum alignment of the allocation.  If 0,
 the allocated segment will be aligned as the arena's quantum.
 .It Fa phase
 The allocated segment must be
@@ -129,8 +128,8 @@
 .Pp
 The
 .Fa vmflag
-argument controls the behaviour of the allocation.  As described in
-.Sx PARAMETERS
+argument controls the behaviour of the allocation, as described in
+.Sx PARAMETERS .
 .Pp
 For allocations with complex requirements, such as those used for DMA
 .Fn vmem_xalloc
@@ -165,4 +164,5 @@
 flag is specified, these functions can never fail (but may block forever).
 .Sh SEE ALSO
 .Xr vmem 9 ,
+.Xr vmem_contains 9F ,
 .Xr vmem_create 9F
--- old/usr/src/man/man9f/vmem_contains.9f	2017-02-03 18:31:01.039631598 -0500
+++ new/usr/src/man/man9f/vmem_contains.9f	2017-02-03 18:31:01.074363332 -0500
@@ -15,7 +15,7 @@
 .Dt VMEM_CONTAINS 9F
 .Os
 .Sh NAME
-.Nm vmem_contains ,
+.Nm vmem_contains
 .Nd check for membership in a vmem arena
 .Sh SYNOPSIS
 .In sys/vmem.h
--- old/usr/src/man/man9f/vmem_create.9f	2017-02-03 18:31:02.577345354 -0500
+++ new/usr/src/man/man9f/vmem_create.9f	2017-02-03 18:31:02.611849821 -0500
@@ -63,33 +63,100 @@
 .It Fa base
 An address indicating the lowest possible value in the arena.
 .It Fa size
-The size of the arena to create
+The size of the arena to create.
 .It Fa quantum
 The arena's
 .Dq quantum .
-The granularity of the arena.  The amount allocated at minimum by each request.
+The granularity of the arena.  The amount allocated at minimum by each
+request.  Must be a power of 2.
 .It Fa afunc
 A function which is called to import new spans from
-.Fa source .
-Which may be
+.Fa source ,
+which may be
 .Dv NULL
 if this arena does not import from another.
+When calling
+.Fn vmem_create
+.Fa afunc
+is an
+.Vt vmem_alloc_t
+a function taking three parameters and returning a pointer to
+.Vt void
+(the imported space):
+.Bl -tag -width Ds
+.It Fa "vmem_t *"
+The source arena from which we'll import.  The
+.Fa source
+argument to
+.Fn vmem_create .
+.It Fa size_t
+The size to import
+.It Fa int
+The
+.Fa vmflag
+argument used for the import.
+.El
+.Pp
+When calling
+.Fn vmem_xcreate
+.Fa afunc
+is an
+.Vt vmem_ximport_t
+a function taking four parameters and returning a pointer to
+.Vt void
+(the imported space):
+.Bl -tag -width Ds
+.It Fa "vmem_t *"
+The source arena from which we'll import.  The
+.Fa source
+argument to
+.Fn vmem_xcreate .
+.It Fa "size_t *"
+The size of the import,
+.Fa afunc
+may
+.Em increase
+this size if that is desirable, but must never decrease it.
+.It Fa size_t
+The desired alignment of the imported space.
+.It Fa int
+the
+.Fa vmflag
+argument used for the import.
+.El
 .It Fa ffunc
 A function which is called to return spans to
-.Fa source .
-Which may be
+.Fa source ,
+which may be
 .Dv NULL
 if this arena does not import from another.
+This is a
+.Vt vmem_free_t
+a function taking three parametes and returning void:
+.Bl -tag -width Ds
+.It Fa "vmem_t"
+The arena to which space is being returned.  The
+.Fa source
+argument to
+.Fn vmem_create
+or
+.Fn vmem_xcreate .
+.It Fa "void *"
+The span being returned to the source arena.
+.It Fa "size_t"
+The size of the span being returned to the source arena.
+.El
 .It Fa source
-An arena from which this arena will import.
-Which may be
+An arena from which this arena will import,
+which may be
 .Dv NULL
 if this arena does not import from another.
 .It Fa qcache_max
 Each arena offers caching of integer multiples of
 .Fa quantum
 up to
-.Fa qcache_max .
+.Fa qcache_max ,
+which may be 0.
 .It Fa vmflag
 A bitmask of flags indicating the characteristics of this arena.
 .Bl -tag -width Ds
@@ -126,12 +193,13 @@
 .Fa source .
 It is only legal to
 .Em increase
-thise size.
+this size.
 .Sh CONTEXT
 These functions can be called from user or kernel context.
 .Sh RETURN VALUES
 Upon successful completion the
-.Fn vmem_create and
+.Fn vmem_create
+and
 .Fn vmem_xcreate
 functions return a pointer to a vmem arena.  Otherwise,
 .Dv NULL
--- old/usr/src/man/man9f/vmem_walk.9f	2017-02-03 18:31:04.130914240 -0500
+++ new/usr/src/man/man9f/vmem_walk.9f	2017-02-03 18:31:04.165359875 -0500
@@ -37,34 +37,34 @@
 .Sh PARAMETERS
 .Bl -tag -width Ds
 .It Fa vmp
-The vmem arena to walk
+The vmem arena to walk.
 .It Fa typemask
-A bitmask indicating the types of segment to operate on
+A bitmask indicating the types of segment to operate on.
 .Bl -tag -width Ds
 .It Dv VMEM_ALLOC
-Allocated segments
+Allocated segments.
 .It Dv VMEM_FREE
-Free segments
+Free segments.
 .El
 .It Fa func
 The function to apply to each segment matching
 .Fa typemask .
 .Fa func
-should be of 3 values and return void:
+should accept 3 arguments and return void:
 .Bl -tag -width Ds
 .It Fa "void *arg"
 The
 .Fa arg
 passed to
-.Fn vmem_walk
+.Fn vmem_walk .
 .It Fa "void *vaddr"
-The base address of the segment
+The base address of the segment.
 .It Fa "size_t size"
-The size of the segment
+The size of the segment.
 .El
 .It Fa arg
 An arbitrary argument passed to each call to
-.Fn func
+.Fn func .
 .El
 .Sh DESCRIPTION
 .Fn vmem_walk
