From: Thomas Huth <thuth@linux.vnet.ibm.com>
To: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Cc: aik@ozlabs.ru, armbru@redhat.com, agraf@suse.de,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
marcel.apfelbaum@gmail.com, Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 1/2] machine: add default_ram_size to machine class
Date: Thu, 5 Mar 2015 11:41:38 +0100 [thread overview]
Message-ID: <20150305114138.1b4c8868@oc7435384737.ibm.com> (raw)
In-Reply-To: <87pp8n3fcj.fsf@abhimanyu.in.ibm.com>
On Thu, 05 Mar 2015 16:01:40 +0530
Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> wrote:
> Hi Igor,
>
> Thanks for the review.
>
> Igor Mammedov <imammedo@redhat.com> writes:
> > On Thu, 5 Mar 2015 14:36:10 +0530
> > Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> wrote:
> >
> >> Machines types can have different requirement for default ram
> >> size. Introduce a member in the machine class and set the current
> >> default_ram_size to 128MB.
> >>
> >> For QEMUMachine types override the value during the registration of
> >> the machine and for MachineClass introduce the generic class init
> >> setting the default_ram_size.
> >>
> >> In case the user passes memory that is lesser that the default ram
> >> size, upscale the value to the machine's default ram size with a
> >> warning.
...
> >> @@ -2684,6 +2683,12 @@ static void set_memory_options(uint64_t *ram_slots, ram_addr_t *maxram_size)
> >> exit(EXIT_FAILURE);
> >> }
> >>
> >> + if (ram_size < default_ram_size) {
> >> + fprintf(stderr, "WARNING: qemu: %s guest ram size defaulting to %ld MB\n",
> >> + mc->name, default_ram_size / (1024 * 1024));
> >> + ram_size = default_ram_size;
> >> + }
> > In previous review someone explicitly asked not to override lower ram_size
> > if it was requested by user on command line.
>
> We would get to a state where the VM is not bootable. I understand that
> user has provided a value, but what if the value is not correct?
Well, as I said before: There are older versions of Linux which run fine
with 128 MB or even 64 MB of memory. Do you really want to block this
just because newer Linux distros now need more RAM now by default?
IMHO if the user specified the amount of RAM at the command line, you
can assume that they know what they are doing.
Thomas
next prev parent reply other threads:[~2015-03-05 10:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 9:06 [Qemu-devel] [PATCH v3 0/2] Introduce default ram size in MachineClass Nikunj A Dadhania
2015-03-05 9:06 ` [Qemu-devel] [PATCH v3 1/2] machine: add default_ram_size to machine class Nikunj A Dadhania
2015-03-05 10:17 ` Igor Mammedov
2015-03-05 10:31 ` Nikunj A Dadhania
2015-03-05 10:41 ` Thomas Huth [this message]
2015-03-05 10:54 ` Nikunj A Dadhania
2015-03-05 9:06 ` [Qemu-devel] [PATCH v3 2/2] spapr: override default ram size 1GB Nikunj A Dadhania
2015-03-05 10:19 ` Igor Mammedov
2015-03-05 10:04 ` [Qemu-devel] [PATCH v3 0/2] Introduce default ram size in MachineClass Markus Armbruster
2015-03-05 10:24 ` Nikunj A Dadhania
2015-03-05 12:05 ` Peter Maydell
2015-03-05 15:07 ` Nikunj A Dadhania
2015-03-05 12:19 ` Markus Armbruster
2015-03-05 15:02 ` Nikunj A Dadhania
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150305114138.1b4c8868@oc7435384737.ibm.com \
--to=thuth@linux.vnet.ibm.com \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=armbru@redhat.com \
--cc=imammedo@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=nikunj@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).