On 05/17/2012 12:46 PM, Avi Kivity wrote:
> On 05/16/2012 08:58 PM, Eric Blake wrote:
>> On 05/16/2012 11:04 AM, Orit Wasserman wrote:
>>
>>>>> +- "value": cache size in bytes (json-int)
>>>>
>>>> Would it be any easier to take 'order' (log2 of the size) instead of the
>>>> actual cache size?  That is, instead of calling "value":1048576, I would
>>>> rather type "value":20.
>>> Well the user is considering how much memory is going to be used and I 
>>> though that it
>>> is simpler to use 1G than 30.
>>
>> Libvirt can cope with either style, so maybe it's worth waiting for
>> anyone else to chime in on which style is easier.
> 
> Let's be consistent.  It's best to use bytes everywhere (not kilobytes,
> not megabytes, not pages, not order, or anything else we can come up with).
> 
> If you really want to specify order (not that I can think of a reason
> why), we can use a suffix: 20ORD == 1M == 1048576.
That is what used at the moment.
> 
> btw, maybe it's better to handle a non-power-of-two cache size by
> rounding down.  Less errors, less puzzlement, and less memory used.
Sounds good to me.

Orit
> 


Reply via email to