Skip to content

Commit

Permalink
add ukey cases to fat
Browse files Browse the repository at this point in the history
  • Loading branch information
Wu Fengguang committed Dec 8, 2011
1 parent 4531890 commit 434cd3e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
17 changes: 6 additions & 11 deletions cases-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,13 @@ dd_job() {
echo $job
}

ukey_hdd() {
make_dir UKEY-HDD $(dd_job) || return
run_test dd
}

thresh() {
local dirty_thresh=$1
local unit=$2
local ndisk=${3:-1}
local array=${4:-JBOD}

local bits output_dir bg_dirty_thresh bg_name
local bits output_dir bg_dirty_thresh bg_name storage_prefix

[[ $dirty_thresh =~ : ]] && {
bg_dirty_thresh=${dirty_thresh##*:}
Expand All @@ -116,16 +111,16 @@ thresh() {
ndisk=$(echo $devices | wc -w)

if (( $ndisk == 1 )); then
output_dir="thresh=${dirty_thresh}${unit}${bg_name}"
[[ $storage != HDD ]] && storage_prefix=$storage-
output_dir="${storage_prefix}thresh=${dirty_thresh}${unit}${bg_name}"
else
: ${STORAGE=HDD}
output_dir="$array-${ndisk}${STORAGE}-thresh=${dirty_thresh}${unit}${bg_name}"
output_dir="$array-${ndisk}${storage}-thresh=${dirty_thresh}${unit}${bg_name}"
fi

make_dir $output_dir $(dd_job) || return

[[ $2 = M ]] && bits=20
[[ $2 = G ]] && bits=30
[[ $unit = M || $unit = m ]] && bits=20
[[ $unit = G || $unit = g ]] && bits=30

[[ $bg_dirty_thresh ]] && {
echo $((bg_dirty_thresh<<bits)) > /proc/sys/vm/dirty_background_bytes
Expand Down
21 changes: 21 additions & 0 deletions fat-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ DD_TASKS="1 10 100"
test_cases() {
echo
echo ukey_hdd
echo ukey_thresh_100m

echo thresh_1000m_999m
echo thresh_1000m_990m
echo thresh_1000m
echo thresh_100m
echo thresh_10m
echo thresh_1m

echo fio_fat_mmap_randwrite_4k
echo fio_fat_mmap_randwrite_64k
echo fio_fat_rates
Expand All @@ -30,3 +33,21 @@ test_cases() {
# echo fat-fio-mmap.sh
# echo fat-fio-rates.sh
}

ukey_hdd() {
make_dir UKEY-HDD $(dd_job) || return
run_test dd
}

ukey_thresh() {
storage=UKEY
devices=/dev/sdb3
thresh "$@"
}

ukey_thresh_0() { ukey_thresh 0; }
ukey_thresh_1m() { ukey_thresh 1 M; }
ukey_thresh_10m() { ukey_thresh 10 M; }
ukey_thresh_100m() { ukey_thresh 100 M; }
ukey_thresh_1000m() { ukey_thresh 1000 M; }

1 change: 1 addition & 0 deletions main-loop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ for fs in ${FILESYSTEMS:-ext4}
do
for scheme in $(test_cases)
do
storage=${STORAGE:-HDD}
devices=$DEVICES
[[ $fs =~ nfs ]] && devices=$NFS_DEVICE

Expand Down

0 comments on commit 434cd3e

Please sign in to comment.