Re: [Qemu-devel] [PATCH V5 1/5] throttle: Add a new throttling API implementing continuous leaky bucket.

2013-08-19 Thread Paolo Bonzini
Il 16/08/2013 13:45, Stefan Hajnoczi ha scritto: +#define BUCKETS_COUNT 6 + +typedef enum { +THROTTLE_BPS_TOTAL = 0, +THROTTLE_BPS_READ = 1, +THROTTLE_BPS_WRITE = 2, +THROTTLE_OPS_TOTAL = 3, +THROTTLE_OPS_READ = 4, +THROTTLE_OPS_WRITE = 5, +}

Re: [Qemu-devel] [PATCH V5 1/5] throttle: Add a new throttling API implementing continuous leaky bucket.

2013-08-16 Thread Stefan Hajnoczi
On Mon, Aug 12, 2013 at 06:53:12PM +0200, Benoît Canet wrote: +#ifndef THROTTLING_H +#define THROTTLING_H THROTTLE_H + +#include stdint.h +#include qemu-common.h +#include qemu/timer.h + +#define NANOSECONDS_PER_SECOND 10.0 + +#define BUCKETS_COUNT 6 + +typedef enum { +

Re: [Qemu-devel] [PATCH V5 1/5] throttle: Add a new throttling API implementing continuous leaky bucket.

2013-08-14 Thread Fam Zheng
On Mon, 08/12 18:53, Benoît Canet wrote: Implement the continuous leaky bucket algorithm devised on IRC as a separate module. Signed-off-by: Benoit Canet ben...@irqsave.net --- include/qemu/throttle.h | 105 + util/Makefile.objs |1 + util/throttle.c | 391

[Qemu-devel] [PATCH V5 1/5] throttle: Add a new throttling API implementing continuous leaky bucket.

2013-08-12 Thread Benoît Canet
Implement the continuous leaky bucket algorithm devised on IRC as a separate module. Signed-off-by: Benoit Canet ben...@irqsave.net --- include/qemu/throttle.h | 105 + util/Makefile.objs |1 + util/throttle.c | 391 +++