Whamcloud - gitweb
LU-7470 nrs: extend TBF with NID/JobID/OPCode expression 45/17345/15
authorQian Yingjin <qian@ddn.com>
Mon, 13 Jun 2016 01:27:00 +0000 (09:27 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 6 Apr 2017 00:59:40 +0000 (00:59 +0000)
commit949bc00ad1ec0786940bd00ba53479d88c23ea14
tree6dccb2fc11145d5e71ac3ee3bce4be1b32240a10
parentde7d11b4e1115274c32b82e84829710741a8958d
LU-7470 nrs: extend TBF with NID/JobID/OPCode expression

Extend the NRS TBF policy to support complex rules with
expressions of NID/JobID/OPCode conditions.

Start the generic extended TBF policy:
    lctl set_param ost.OSS.ost_io.nrs_policies="tbf"

Following rule is valid:
    lctl set_param ost.OSS.ost_io.nrs_tbf_rule=
"start $NAME opcode={ost_write}&jobid={dd.0},
 nid={192.168.1.[1-128]@tcp 0@lo} rate=100"
In the rule:
"&" represents the conditional conjunction;
"," represents the conditional disjunction;

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I7541f9d09b2a952853eab97f0aa23f53e2c30a12
Reviewed-on: https://review.whamcloud.com/17345
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_nrs_tbf.h
lustre/ptlrpc/nrs_tbf.c
lustre/tests/sanityn.sh