lkml.org 
[lkml]   [2014]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 17/50] mars: add new file include/linux/brick/lib_limiter.h
    Date
    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


    \
     
     \ /
      Last update: 2014-07-02 00:41    [W:4.254 / U:0.164 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site