The sanity test_42e should check that the RPCs with less than 16 pages
are not more than 15%, instead of checking the 16-page RPCs are more
than 85%, because the pages could be merged into even larger(> 16 pages)
RPCs.
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I603f9d278b55cd850d66466050745ecb80e2ff02
Reviewed-on: http://review.whamcloud.com/1897
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
test_42e() { # bug22074
local TDIR=$DIR/${tdir}e
local pagesz=$(page_size)
test_42e() { # bug22074
local TDIR=$DIR/${tdir}e
local pagesz=$(page_size)
- local pages=16
- local files=$((OSTCOUNT * 500)) # hopefully 500 files on each OST
+ local pages=16 # hardcoded 16 pages, don't change it.
+ local files=$((OSTCOUNT * 500)) # hopefully 500 files on each OST
local proc_osc0="osc.${FSNAME}-OST0000-osc-[^MDT]*"
local max_dirty_mb
local warmup_files
local proc_osc0="osc.${FSNAME}-OST0000-osc-[^MDT]*"
local max_dirty_mb
local warmup_files
sync
$LCTL get_param $proc_osc0/rpc_stats
sync
$LCTL get_param $proc_osc0/rpc_stats
- $LCTL get_param $proc_osc0/rpc_stats |
- while read PPR RRPC RPCT RCUM BAR WRPC WPCT WCUM; do
- [ "$PPR" != "16:" ] && continue
- [ $WPCT -lt 85 ] && error "$pages-page write RPCs only $WPCT% < 85%"
- break # we only want the "pages per rpc" stat
- done
- rm -rf $TDIR
+ local percent=0
+ local have_ppr=false
+ $LCTL get_param $proc_osc0/rpc_stats |
+ while read PPR RRPC RPCT RCUM BAR WRPC WPCT WCUM; do
+ # skip lines until we are at the RPC histogram data
+ [ "$PPR" == "pages" ] && have_ppr=true && continue
+ $have_ppr || continue
+
+ # we only want the percent stat for < 16 pages
+ [ $(echo $PPR | tr -d ':') -ge $pages ] && break
+
+ percent=$((percent + WPCT))
+ if [ $percent -gt 15 ]; then
+ error "less than 16-pages write RPCs" \
+ "$percent% > 15%"
+ break
+ fi
+ done
+ rm -rf $TDIR
}
run_test 42e "verify sub-RPC writes are not done synchronously"
}
run_test 42e "verify sub-RPC writes are not done synchronously"