[PATCH 17/50] mars: add new file include/linux/brick/lib_limiter.h

From: Thomas Schoebel-Theuer
Date: Tue Jul 01 2014 - 17:58:09 EST


Signed-off-by: Thomas Schoebel-Theuer <tst@xxxxxxxxxxxxxxxxxx>
---
include/linux/brick/lib_limiter.h | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 include/linux/brick/lib_limiter.h

diff --git a/include/linux/brick/lib_limiter.h b/include/linux/brick/lib_limiter.h
new file mode 100644
index 0000000..87db968
--- /dev/null
+++ b/include/linux/brick/lib_limiter.h
@@ -0,0 +1,33 @@
+/* (c) 2012 Thomas Schoebel-Theuer / 1&1 Internet AG */
+#ifndef BRICK_LIB_LIMITER_H
+#define BRICK_LIB_LIMITER_H
+
+#include <linux/brick/brick.h>
+
+#include <linux/utsname.h>
+
+struct xio_limiter {
+ /* hierarchy tree */
+ struct xio_limiter *lim_father;
+
+ /* tunables */
+ int lim_max_rate;
+ int lim_max_delay;
+ int lim_min_window;
+ int lim_max_window;
+
+ /* readable */
+ int lim_rate;
+ int lim_cumul;
+ int lim_count;
+ long long lim_stamp;
+
+ /* internal */
+ long long lim_accu;
+};
+
+extern int xio_limit(struct xio_limiter *lim, int amount);
+
+extern void xio_limit_sleep(struct xio_limiter *lim, int amount);
+
+#endif
--
2.0.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/