It tries to test mmap readahead does not miss too much pages,
so we need limit the number of processes of the iozone read.
Test-Parameters: trivial
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ic5c753549234fe2bffcaa42f75208c2295f84ac0
Reviewed-on: http://review.whamcloud.com/23039
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
which iozone || { skip "no iozone installed" && return; }
local old_debug=$($LCTL get_param debug)
which iozone || { skip "no iozone installed" && return; }
local old_debug=$($LCTL get_param debug)
+ old_debug=${old_debug#*=}
$LCTL set_param debug="reada mmap"
# create a test file
$LCTL set_param debug="reada mmap"
# create a test file
$LCTL set_param -n llite.*.read_ahead_stats 0
echo mmap read the file with small block size
$LCTL set_param -n llite.*.read_ahead_stats 0
echo mmap read the file with small block size
- iozone -i 1 -+n -r 32k -s 128m -B -f $DIR/$tfile > /dev/null 2>&1
+ iozone -i 1 -u 1 -l 1 -+n -r 32k -s 128m -B -f $DIR/$tfile \
+ > /dev/null 2>&1
echo checking missing pages
$LCTL get_param llite.*.read_ahead_stats
local miss=$($LCTL get_param -n llite.*.read_ahead_stats |
get_named_value 'misses' | cut -d" " -f1 | calc_total)
echo checking missing pages
$LCTL get_param llite.*.read_ahead_stats
local miss=$($LCTL get_param -n llite.*.read_ahead_stats |
get_named_value 'misses' | cut -d" " -f1 | calc_total)
- $LCTL set_param debug=$old_debug
+ $LCTL set_param debug="$old_debug"
[ $miss -lt 3 ] || error "misses too much pages ('$miss')!"
rm -f $DIR/$tfile
}
[ $miss -lt 3 ] || error "misses too much pages ('$miss')!"
rm -f $DIR/$tfile
}