qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/1] vl/s390x: fixup ram sizes for compat machines


From: Cornelia Huck
Subject: Re: [PATCH v3 1/1] vl/s390x: fixup ram sizes for compat machines
Date: Thu, 2 Apr 2020 16:18:44 +0200

On Thu, 2 Apr 2020 14:35:21 +0200
Christian Borntraeger <address@hidden> wrote:

> On 02.04.20 14:09, Christian Borntraeger wrote:
> > 
> > 
> > On 02.04.20 14:05, Igor Mammedov wrote:  
> >> On Thu, 2 Apr 2020 13:42:22 +0200
> >> Christian Borntraeger <address@hidden> wrote:
> >>  
> >>> On 02.04.20 13:39, Igor Mammedov wrote:
> >>> [...]  
> >>>>>>       
> >>>>>>> +                    "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)  
> > 
> > Another thing: size_to_str is also do rounding (whenever the integer part 
> > is >1000).
> > Doesnt this result in potential messages where both numbers are the same?  
> 
> For example
> 
> 10241263616-> 9.54 GiB
> 10241262592-> 9.54 GiB
> 
> The only guaranteed way to actually see a difference is to use MB.
> 

Ok, so it seems the way to go is to use the uint64_t cast, as
size_to_str() is unfortunately not doing what we need.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]