Messages in this thread Patch in this message | | | From | Thomas Schoebel-Theuer <> | Subject | [PATCH 17/50] mars: add new file include/linux/brick/lib_limiter.h | Date | Tue, 1 Jul 2014 23:46:57 +0200 |
| |
Signed-off-by: Thomas Schoebel-Theuer <tst@schoebel-theuer.de> --- 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
| |