qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v10 8/9] Add set_cachesize command


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH v10 8/9] Add set_cachesize command
Date: Thu, 17 May 2012 12:46:53 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

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.

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.

-- 
error compiling committee.c: too many arguments to function




reply via email to

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