----- Original Message ----- > From: "Eric Blake" <ebl...@redhat.com> > To: "Peter Krempa" <pkre...@redhat.com> > Cc: libvir-list@redhat.com, from...@redhat.com > Sent: Monday, June 15, 2015 6:21:13 PM > Subject: Re: [libvirt] [RFC PATCHv2 1/8] threshold: new API > virDomainBlockSetWriteThreshold > > On 06/15/2015 07:19 AM, Peter Krempa wrote: > > On Fri, Jun 12, 2015 at 13:29:25 -0600, Eric Blake wrote: > >> qemu 2.3 added a new QMP command block-set-write-threshold, > >> which allows callers to get an interrupt when a file hits a > >> write threshold, rather than the current approach of repeatedly > >> polling for file allocation. This patch prepares the API for > >> callers to register to receive the event, as well as a way > >> to query the threshold via virDomainListGetStats(). > >> > > >> + > >> +typedef enum { > >> + /* threshold is thousandth of a percentage (0 to 100000) relative to > > > > You managed to choose a unusual unit. Commonly used ones are 1/1000 and > > 1/1 000 000. Financial world also uses 1/10 000. Your unit of 1/100 000 > > is not among: > > > > https://en.wikipedia.org/wiki/Parts-per_notation#Parts-per_expressions > > > > I'd again suggest to use 1/1 000 000. Or if you want to be uber preciese > > you might choose 1/(2^64 - 1). > > Francesco, what precision would you like? Parts per million seems okay > to me, if we want an order of magnitude closer; and I don't think we > need anything beyond that. Or if parts per thousand is sufficient, that > leads to smaller numbers on input. But it's pretty trivial for me to > adjust the code to a different base, for whatever people would like.
We (in oVirt) use very coarse thresholds. For our current needs, I believe even parts per thousand is sufficient. Trying to be a bit forward thinking, I believe parts per million is perfectly fine. Bests, -- Francesco Romani RedHat Engineering Virtualization R & D Phone: 8261328 IRC: fromani -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list