bhyve: improve memory size documentation

A couple of minor memory size option related nits:

 - use common name 'memsize' (instead of 'max-size' or just 'size')
 - bhyve: update usage with memsize unit suffix, drop legacy "MB"
   unit
 - bhyveload: update usage with memsize unit suffix
 - bhyve(8): document default size
 - bhyveload(8): use memsize formatting like it's done
   in bhyve(8)

Reviewed by:            wblock, grehan
Approved by:            re (kib), wblock, grehan
Differential Revision:  https://reviews.freebsd.org/D6952
This commit is contained in:
Roman Bogorodskiy 2016-06-26 14:44:01 +00:00
parent 20de93c6c0
commit 6ee52c658c
4 changed files with 16 additions and 18 deletions

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd April 18, 2016
.Dd June 24, 2016
.Dt BHYVE 8
.Os
.Sh NAME
@ -36,7 +36,7 @@
.Op Fl c Ar numcpus
.Op Fl g Ar gdbport
.Op Fl l Ar lpcdev Ns Op , Ns Ar conf
.Op Fl m Ar size Ns Op Ar K|k|M|m|G|g|T|t
.Op Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
.Op Fl p Ar vcpu:hostcpu
.Op Fl s Ar slot,emulation Ns Op , Ns Ar conf
.Op Fl U Ar uuid
@ -105,7 +105,7 @@ and
.Ar com2
and the boot ROM device
.Ar bootrom .
.It Fl m Ar size Ns Op Ar K|k|M|m|G|g|T|t
.It Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
Guest physical memory size in bytes.
This must be the same size that was given to
.Xr bhyveload 8 .
@ -114,6 +114,9 @@ The size argument may be suffixed with one of K, M, G or T (either upper
or lower case) to indicate a multiple of kilobytes, megabytes, gigabytes,
or terabytes.
If no suffix is given, the value is assumed to be in megabytes.
.Pp
.Ar memsize
defaults to 256M.
.It Fl p Ar vcpu:hostcpu
Pin guest's virtual CPU
.Em vcpu

View File

@ -125,7 +125,7 @@ usage(int code)
fprintf(stderr,
"Usage: %s [-abehuwxACHPSWY] [-c vcpus] [-g <gdb port>] [-l <lpc>]\n"
" %*s [-m mem] [-p vcpu:hostcpu] [-s <pci>] [-U uuid] <vm>\n"
" %*s [-m memsize[K|k|M|m|G|g|T|t]] [-p vcpu:hostcpu] [-s <pci>] [-U uuid] <vm>\n"
" -a: local apic is in xAPIC mode (deprecated)\n"
" -A: create ACPI tables\n"
" -c: # cpus (default 1)\n"
@ -135,7 +135,7 @@ usage(int code)
" -h: help\n"
" -H: vmexit from the guest on hlt\n"
" -l: LPC device configuration\n"
" -m: memory size in MB\n"
" -m: memory size\n"
" -p: pin 'vcpu' to 'hostcpu'\n"
" -P: vmexit from the guest on pause\n"
" -s: <slot,driver,configinfo> PCI slot config\n"

View File

@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd February 26, 2016
.Dd June 24, 2016
.Dt BHYVELOAD 8
.Os
.Sh NAME
@ -42,7 +42,7 @@ guest inside a bhyve virtual machine
.Op Fl e Ar name=value
.Op Fl h Ar host-path
.Op Fl l Ar os-loader
.Op Fl m Ar mem-size
.Op Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
.Ar vmname
.Sh DESCRIPTION
.Nm
@ -103,16 +103,12 @@ will use
which presents a standard
.Fx
loader.
.It Fl m Ar mem-size Xo
.Sm off
.Op Cm K | k | M | m | G | g | T | t
.Xc
.Sm on
.Ar mem-size
.It Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
.Ar memsize
is the amount of memory allocated to the guest.
.Pp
The
.Ar mem-size
.Ar memsize
argument may be suffixed with one of
.Cm K ,
.Cm M ,
@ -123,9 +119,8 @@ or
Kilobytes, Megabytes, Gigabytes or Terabytes
respectively.
.Pp
The default value of
.Ar mem-size
is 256M.
.Ar memsize
defaults to 256M.
.It Fl C
Include guest memory in the core file when
.Nm

View File

@ -648,7 +648,7 @@ usage(void)
fprintf(stderr,
"usage: %s [-S][-c <console-device>] [-d <disk-path>] [-e <name=value>]\n"
" %*s [-h <host-path>] [-m mem-size] <vmname>\n",
" %*s [-h <host-path>] [-m memsize[K|k|M|m|G|g|T|t]] <vmname>\n",
progname,
(int)strlen(progname), "");
exit(1);