diff mbox

[1/2] qemu-options.hx: improve -m description

Message ID 1425334488-28123-2-git-send-email-lcapitulino@redhat.com
State New
Headers show

Commit Message

Luiz Capitulino March 2, 2015, 10:14 p.m. UTC
Add memory hotplug options to the command-line format. Also,
add a complete command-line example and improve description.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qemu-options.hx | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

Comments

Igor Mammedov March 3, 2015, 1:06 p.m. UTC | #1
On Mon,  2 Mar 2015 17:14:47 -0500
Luiz Capitulino <lcapitulino@redhat.com> wrote:

> Add memory hotplug options to the command-line format. Also,
> add a complete command-line example and improve description.
> 
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> ---
>  qemu-options.hx | 23 ++++++++++++++++++-----
>  1 file changed, 18 insertions(+), 5 deletions(-)
> 
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 85ca3ad..6fa46d4 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -237,12 +237,25 @@ DEF("m", HAS_ARG, QEMU_OPTION_m,
>      "NOTE: Some architectures might enforce a specific granularity\n",
>      QEMU_ARCH_ALL)
>  STEXI
> -@item -m [size=]@var{megs}
> +@item -m [size=]@var{megs}[,slots=n,maxmem=size]
>  @findex -m
> -Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB.  Optionally,
> -a suffix of ``M'' or ``G'' can be used to signify a value in megabytes or
> -gigabytes respectively. Optional pair @var{slots}, @var{maxmem} could be used
> -to set amount of hotluggable memory slots and possible maximum amount of memory.
> +Sets guest startup RAM size to @var{megs} megabytes. Default is 128 MiB.
> +Optionally, a suffix of ``M'' or ``G'' can be used to signify a value in
> +megabytes or gigabytes respectively. Optional pair @var{slots}, @var{maxmem}
> +could be used to set amount of hotpluggable memory slots and maximum amount of
> +memory. Note that @var{maxmem} must be aligned to the page size.
> +
> +For example, the following command-line sets the guest startup RAM size to
> +1GB, creates 3 slots to hotplug additional memory and sets the maximum
> +memory the guest can reach to 4GB:
> +
> +@example
> +qemy-system-i386 -m 1G,slots=3,maxmem=4G
Perhaps it should be qemy-system-x86_64,
I'm not sure that -i386 target would work since hotplug memory is
mapped above 4G.

> +@end example
> +
> +If @var{slots} and @var{maxmem} are not specified, memory hotplug won't
> +be enabled and the guest startup RAM will never increase (although it can
> +be decreased with the use of ballooning).
Technically that's not true, startup RAM is not decreased it's just landed out
by balloon driver to host. Is you restart guest it will use ALL startup memory
until the balloon driver is loaded.
I'd suggest to drop "(...)" part here.

>  ETEXI
>  
>  DEF("mem-path", HAS_ARG, QEMU_OPTION_mempath,
Paulo Ricardo Paz Vital March 3, 2015, 1:32 p.m. UTC | #2
On Tue, 2015-03-03 at 14:06 +0100, Igor Mammedov wrote:
> On Mon,  2 Mar 2015 17:14:47 -0500
> Luiz Capitulino <lcapitulino@redhat.com> wrote:
> 
> > Add memory hotplug options to the command-line format. Also,
> > add a complete command-line example and improve description.
> > 
> > Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> > ---
> >  qemu-options.hx | 23 ++++++++++++++++++-----
> >  1 file changed, 18 insertions(+), 5 deletions(-)
> > 
> > diff --git a/qemu-options.hx b/qemu-options.hx
> > index 85ca3ad..6fa46d4 100644
> > --- a/qemu-options.hx
> > +++ b/qemu-options.hx
> > @@ -237,12 +237,25 @@ DEF("m", HAS_ARG, QEMU_OPTION_m,
> >      "NOTE: Some architectures might enforce a specific granularity\n",
> >      QEMU_ARCH_ALL)
> >  STEXI
> > -@item -m [size=]@var{megs}
> > +@item -m [size=]@var{megs}[,slots=n,maxmem=size]
> >  @findex -m
> > -Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB.  Optionally,
> > -a suffix of ``M'' or ``G'' can be used to signify a value in megabytes or
> > -gigabytes respectively. Optional pair @var{slots}, @var{maxmem} could be used
> > -to set amount of hotluggable memory slots and possible maximum amount of memory.
> > +Sets guest startup RAM size to @var{megs} megabytes. Default is 128 MiB.
> > +Optionally, a suffix of ``M'' or ``G'' can be used to signify a value in
> > +megabytes or gigabytes respectively. Optional pair @var{slots}, @var{maxmem}
> > +could be used to set amount of hotpluggable memory slots and maximum amount of
> > +memory. Note that @var{maxmem} must be aligned to the page size.
> > +
> > +For example, the following command-line sets the guest startup RAM size to
> > +1GB, creates 3 slots to hotplug additional memory and sets the maximum
> > +memory the guest can reach to 4GB:
> > +
> > +@example
> > +qemy-system-i386 -m 1G,slots=3,maxmem=4G
> Perhaps it should be qemy-system-x86_64,
> I'm not sure that -i386 target would work since hotplug memory is
> mapped above 4G.

Also it should be qemu, not qemy :-D

> 
> > +@end example
> > +
> > +If @var{slots} and @var{maxmem} are not specified, memory hotplug won't
> > +be enabled and the guest startup RAM will never increase (although it can
> > +be decreased with the use of ballooning).
> Technically that's not true, startup RAM is not decreased it's just landed out
> by balloon driver to host. Is you restart guest it will use ALL startup memory
> until the balloon driver is loaded.
> I'd suggest to drop "(...)" part here.
> 
> >  ETEXI
> >  
> >  DEF("mem-path", HAS_ARG, QEMU_OPTION_mempath,
>
Luiz Capitulino March 3, 2015, 2:18 p.m. UTC | #3
On Tue, 03 Mar 2015 14:32:43 +0100
Paulo Ricardo Paz Vital <paulo.vital@profitbricks.com> wrote:

> On Tue, 2015-03-03 at 14:06 +0100, Igor Mammedov wrote:
> > On Mon,  2 Mar 2015 17:14:47 -0500
> > Luiz Capitulino <lcapitulino@redhat.com> wrote:
> > 
> > > Add memory hotplug options to the command-line format. Also,
> > > add a complete command-line example and improve description.
> > > 
> > > Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> > > ---
> > >  qemu-options.hx | 23 ++++++++++++++++++-----
> > >  1 file changed, 18 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/qemu-options.hx b/qemu-options.hx
> > > index 85ca3ad..6fa46d4 100644
> > > --- a/qemu-options.hx
> > > +++ b/qemu-options.hx
> > > @@ -237,12 +237,25 @@ DEF("m", HAS_ARG, QEMU_OPTION_m,
> > >      "NOTE: Some architectures might enforce a specific granularity\n",
> > >      QEMU_ARCH_ALL)
> > >  STEXI
> > > -@item -m [size=]@var{megs}
> > > +@item -m [size=]@var{megs}[,slots=n,maxmem=size]
> > >  @findex -m
> > > -Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB.  Optionally,
> > > -a suffix of ``M'' or ``G'' can be used to signify a value in megabytes or
> > > -gigabytes respectively. Optional pair @var{slots}, @var{maxmem} could be used
> > > -to set amount of hotluggable memory slots and possible maximum amount of memory.
> > > +Sets guest startup RAM size to @var{megs} megabytes. Default is 128 MiB.
> > > +Optionally, a suffix of ``M'' or ``G'' can be used to signify a value in
> > > +megabytes or gigabytes respectively. Optional pair @var{slots}, @var{maxmem}
> > > +could be used to set amount of hotpluggable memory slots and maximum amount of
> > > +memory. Note that @var{maxmem} must be aligned to the page size.
> > > +
> > > +For example, the following command-line sets the guest startup RAM size to
> > > +1GB, creates 3 slots to hotplug additional memory and sets the maximum
> > > +memory the guest can reach to 4GB:
> > > +
> > > +@example
> > > +qemy-system-i386 -m 1G,slots=3,maxmem=4G
> > Perhaps it should be qemy-system-x86_64,
> > I'm not sure that -i386 target would work since hotplug memory is
> > mapped above 4G.
> 
> Also it should be qemu, not qemy :-D

LOL. Fixed it and added Igor's suggestions too.

> 
> > 
> > > +@end example
> > > +
> > > +If @var{slots} and @var{maxmem} are not specified, memory hotplug won't
> > > +be enabled and the guest startup RAM will never increase (although it can
> > > +be decreased with the use of ballooning).
> > Technically that's not true, startup RAM is not decreased it's just landed out
> > by balloon driver to host. Is you restart guest it will use ALL startup memory
> > until the balloon driver is loaded.
> > I'd suggest to drop "(...)" part here.
> > 
> > >  ETEXI
> > >  
> > >  DEF("mem-path", HAS_ARG, QEMU_OPTION_mempath,
> > 
>
diff mbox

Patch

diff --git a/qemu-options.hx b/qemu-options.hx
index 85ca3ad..6fa46d4 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -237,12 +237,25 @@  DEF("m", HAS_ARG, QEMU_OPTION_m,
     "NOTE: Some architectures might enforce a specific granularity\n",
     QEMU_ARCH_ALL)
 STEXI
-@item -m [size=]@var{megs}
+@item -m [size=]@var{megs}[,slots=n,maxmem=size]
 @findex -m
-Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB.  Optionally,
-a suffix of ``M'' or ``G'' can be used to signify a value in megabytes or
-gigabytes respectively. Optional pair @var{slots}, @var{maxmem} could be used
-to set amount of hotluggable memory slots and possible maximum amount of memory.
+Sets guest startup RAM size to @var{megs} megabytes. Default is 128 MiB.
+Optionally, a suffix of ``M'' or ``G'' can be used to signify a value in
+megabytes or gigabytes respectively. Optional pair @var{slots}, @var{maxmem}
+could be used to set amount of hotpluggable memory slots and maximum amount of
+memory. Note that @var{maxmem} must be aligned to the page size.
+
+For example, the following command-line sets the guest startup RAM size to
+1GB, creates 3 slots to hotplug additional memory and sets the maximum
+memory the guest can reach to 4GB:
+
+@example
+qemy-system-i386 -m 1G,slots=3,maxmem=4G
+@end example
+
+If @var{slots} and @var{maxmem} are not specified, memory hotplug won't
+be enabled and the guest startup RAM will never increase (although it can
+be decreased with the use of ballooning).
 ETEXI
 
 DEF("mem-path", HAS_ARG, QEMU_OPTION_mempath,