From: Igor Mammedov <imammedo@redhat.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: "Lukáš Doktor" <ldoktor@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Janosch Frank" <frankja@linux.ibm.com>,
"David Hildenbrand" <david@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
"Halil Pasic" <pasic@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@de.ibm.com>,
qemu-s390x <qemu-s390x@nongnu.org>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [PATCH v3 1/1] vl/s390x: fixup ram sizes for compat machines
Date: Thu, 2 Apr 2020 13:39:58 +0200 [thread overview]
Message-ID: <20200402133958.72fabf45@redhat.com> (raw)
In-Reply-To: <20200402112735.6961297d.cohuck@redhat.com>
On Thu, 2 Apr 2020 11:27:35 +0200
Cornelia Huck <cohuck@redhat.com> wrote:
> On Wed, 1 Apr 2020 18:34:56 +0200
> Igor Mammedov <imammedo@redhat.com> wrote:
>
> > On Wed, 1 Apr 2020 08:37:54 -0400
> > Christian Borntraeger <borntraeger@de.ibm.com> wrote:
>
> > > +static ram_addr_t s390_fixup_ram_size(ram_addr_t sz)
> > > +{
> > > + /* same logic as in sclp.c */
> > > + int increment_size = 20;
> > > + ram_addr_t newsz;
> > > +
> > > + while ((sz >> increment_size) > MAX_STORAGE_INCREMENTS) {
> > > + increment_size++;
> > > + }
> > > + newsz = sz >> increment_size << increment_size;
> > > +
> > > + if (sz != newsz) {
> > > + qemu_printf("Ram size %" PRIu64 "MB was fixed up to %" PRIu64
> > ^^^^^^^^
> >
> > for unaware user it could be confusing as it could be read as 'value was increased'
> > s/fixed up/amended/ might be better
>
> "rounded", perhaps?
>
> >
> > > + "MB to match machine restrictions. Consider updating "
> > > + "the guest definition.i\n", sz / MiB, newsz / MiB);
> >
> > also it might be better to use size_to_str() to format numbers
>
> The text explicitly talks about 'MB'... not sure if it would be
> confusing if the user specified MB and ended up with GB or so in this
> message.
MB can be dropped, since it still might not match what user specified with -m
it could be specified in b/kb/mb/gb over there
so I'd drop MB and print value size_to_str() returns
(it will add appropriate suffix if I'm not mistaken)
> >
> > > + }
> > > + return newsz;
> > > +}
> > > +
>
> (If we can agree upon message and format, I'll happily fix that up when
> applying.)
>
>
next prev parent reply other threads:[~2020-04-02 11:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 12:37 [PATCH v3 1/1] vl/s390x: fixup ram sizes for compat machines Christian Borntraeger
2020-04-01 12:46 ` Christian Borntraeger
2020-04-01 13:14 ` David Hildenbrand
2020-04-02 9:22 ` Cornelia Huck
2020-04-02 9:25 ` Christian Borntraeger
2020-04-02 10:27 ` Cornelia Huck
2020-04-02 10:32 ` Christian Borntraeger
2020-04-01 16:34 ` Igor Mammedov
2020-04-02 9:27 ` Cornelia Huck
2020-04-02 9:39 ` Christian Borntraeger
2020-04-02 9:43 ` Cornelia Huck
2020-04-02 11:25 ` Cornelia Huck
2020-04-02 11:32 ` Christian Borntraeger
2020-04-02 11:39 ` Igor Mammedov [this message]
2020-04-02 11:42 ` Christian Borntraeger
2020-04-02 12:05 ` Igor Mammedov
2020-04-02 12:09 ` Christian Borntraeger
2020-04-02 12:35 ` Christian Borntraeger
2020-04-02 14:18 ` Cornelia Huck
2020-04-02 15:01 ` Igor Mammedov
2020-04-02 17:48 ` Peter Xu
2020-04-02 15:16 ` Cornelia Huck
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=20200402133958.72fabf45@redhat.com \
--to=imammedo@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=ldoktor@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
--cc=thuth@redhat.com \
/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).