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,
+}
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 {
+
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
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 +++