diff options
author | Fengguang Wu <fengguang.wu@intel.com> | 2013-09-14 21:06:52 +0800 |
---|---|---|
committer | Fengguang Wu <fengguang.wu@intel.com> | 2013-09-15 08:58:34 +0800 |
commit | dbc77265b1c3d16f1dbcd2fc745289a35265b313 (patch) | |
tree | 6cabea72a181c1acce3047eb29c441fc857a222a | |
parent | af49414642ddc9eeac5ec9361552e5308f74c8dd (diff) | |
download | vm-scalability-dbc77265b1c3d16f1dbcd2fc745289a35265b313.tar.gz |
convert the rotational cases to be time based
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
-rwxr-xr-x | case-anon-r-rand | 2 | ||||
-rwxr-xr-x | case-anon-r-rand-mt | 2 | ||||
-rwxr-xr-x | case-anon-r-seq | 2 | ||||
-rwxr-xr-x | case-anon-r-seq-mt | 2 | ||||
-rwxr-xr-x | case-anon-rx-rand-mt | 2 | ||||
-rwxr-xr-x | case-anon-rx-seq-mt | 2 | ||||
-rwxr-xr-x | case-lru-file-mmap-read | 4 | ||||
-rwxr-xr-x | case-lru-file-mmap-read-rand | 4 | ||||
-rwxr-xr-x | case-lru-file-readonce | 2 | ||||
-rwxr-xr-x | case-lru-file-readtwice | 2 | ||||
-rwxr-xr-x | case-mmap-pread-rand | 4 | ||||
-rwxr-xr-x | case-mmap-pread-rand-mt | 4 | ||||
-rwxr-xr-x | case-mmap-pread-seq | 4 | ||||
-rwxr-xr-x | case-mmap-pread-seq-mt | 4 | ||||
-rwxr-xr-x | case-mmap-xread-rand-mt | 4 | ||||
-rwxr-xr-x | case-mmap-xread-seq-mt | 4 | ||||
-rwxr-xr-x | case-mremap-xread-rand-mt | 4 | ||||
-rwxr-xr-x | case-posix-advise | 4 | ||||
-rwxr-xr-x | case-remap | 7 | ||||
-rwxr-xr-x | case-small-allocs | 2 | ||||
-rwxr-xr-x | case-small-allocs-mt | 2 | ||||
-rwxr-xr-x | hw_vars | 8 |
22 files changed, 39 insertions, 36 deletions
diff --git a/case-anon-r-rand b/case-anon-r-rand index 96e2f35..e76edea 100755 --- a/case-anon-r-rand +++ b/case-anon-r-rand @@ -2,4 +2,4 @@ source ./hw_vars -$USEMEM -n $nr_cpu --readonly --random $((mem / nr_cpu / 2)) +$USEMEM -n $nr_cpu --readonly --random $((ROTATE_BYTES / nr_cpu)) diff --git a/case-anon-r-rand-mt b/case-anon-r-rand-mt index eaaacdb..9b31f31 100755 --- a/case-anon-r-rand-mt +++ b/case-anon-r-rand-mt @@ -2,4 +2,4 @@ source ./hw_vars -$USEMEM -t $nr_cpu --readonly --random $((mem / nr_cpu / 2)) +$USEMEM -t $nr_cpu --readonly --random $((ROTATE_BYTES / nr_cpu)) diff --git a/case-anon-r-seq b/case-anon-r-seq index 6925001..a72a3e3 100755 --- a/case-anon-r-seq +++ b/case-anon-r-seq @@ -2,4 +2,4 @@ source ./hw_vars -$USEMEM -n $nr_cpu --readonly $((mem / nr_cpu / 2)) +$USEMEM -n $nr_cpu --readonly $((ROTATE_BYTES / nr_cpu)) diff --git a/case-anon-r-seq-mt b/case-anon-r-seq-mt index 60956e6..a131923 100755 --- a/case-anon-r-seq-mt +++ b/case-anon-r-seq-mt @@ -2,4 +2,4 @@ source ./hw_vars -$USEMEM -t $nr_cpu --readonly $((mem / nr_cpu / 2)) +$USEMEM -t $nr_cpu --readonly $((ROTATE_BYTES / nr_cpu)) diff --git a/case-anon-rx-rand-mt b/case-anon-rx-rand-mt index 4b8b31a..159291b 100755 --- a/case-anon-rx-rand-mt +++ b/case-anon-rx-rand-mt @@ -2,4 +2,4 @@ source ./hw_vars -$USEMEM -t $nr_cpu --prealloc --readonly --random $((mem / nr_cpu / 2)) +$USEMEM -t $nr_cpu --prealloc --readonly --random $((ROTATE_BYTES / nr_cpu)) diff --git a/case-anon-rx-seq-mt b/case-anon-rx-seq-mt index 337b019..8c86ee9 100755 --- a/case-anon-rx-seq-mt +++ b/case-anon-rx-seq-mt @@ -2,4 +2,4 @@ source ./hw_vars -$USEMEM -t $nr_cpu --prealloc --readonly $((mem / nr_cpu / 2)) +$USEMEM -t $nr_cpu --prealloc --readonly $((ROTATE_BYTES / nr_cpu)) diff --git a/case-lru-file-mmap-read b/case-lru-file-mmap-read index 680c902..fb59b8c 100755 --- a/case-lru-file-mmap-read +++ b/case-lru-file-mmap-read @@ -10,8 +10,8 @@ source ./hw_vars for i in `seq 1 $nr_cpu` do - create_sparse_file $SPARSE_FILE-$i $((10 * mem / nr_cpu)) - $USEMEM -f $SPARSE_FILE-$i --readonly $((10 * mem / nr_cpu)) & + create_sparse_file $SPARSE_FILE-$i $((ROTATE_BYTES / nr_cpu)) + $USEMEM -f $SPARSE_FILE-$i --readonly $((ROTATE_BYTES / nr_cpu)) & done wait diff --git a/case-lru-file-mmap-read-rand b/case-lru-file-mmap-read-rand index 1cd4dca..0282767 100755 --- a/case-lru-file-mmap-read-rand +++ b/case-lru-file-mmap-read-rand @@ -10,8 +10,8 @@ source ./hw_vars for i in `seq 1 $nr_cpu` do - create_sparse_file $SPARSE_FILE-$i $((10 * mem / nr_cpu)) - $USEMEM -f $SPARSE_FILE-$i --readonly --random $((10 * mem / nr_cpu)) & + create_sparse_file $SPARSE_FILE-$i $((ROTATE_BYTES / nr_cpu)) + $USEMEM -f $SPARSE_FILE-$i --readonly --random $((ROTATE_BYTES / nr_cpu)) & done wait diff --git a/case-lru-file-readonce b/case-lru-file-readonce index 5a3cabd..d32a597 100755 --- a/case-lru-file-readonce +++ b/case-lru-file-readonce @@ -10,7 +10,7 @@ source ./hw_vars for i in `seq 1 $nr_cpu` do - create_sparse_file $SPARSE_FILE-$i $((10 * mem / nr_cpu)) + create_sparse_file $SPARSE_FILE-$i $((ROTATE_BYTES / nr_cpu)) cp $SPARSE_FILE-$i /dev/null & done diff --git a/case-lru-file-readtwice b/case-lru-file-readtwice index 3e2f9f0..7839566 100755 --- a/case-lru-file-readtwice +++ b/case-lru-file-readtwice @@ -17,7 +17,7 @@ source ./hw_vars for i in `seq 1 $nr_cpu` do - create_sparse_file $SPARSE_FILE-$i $((10 * mem / nr_cpu)) + create_sparse_file $SPARSE_FILE-$i $((ROTATE_BYTES / nr_cpu)) cp $SPARSE_FILE-$i /dev/null & cp $SPARSE_FILE-$i /dev/null & done diff --git a/case-mmap-pread-rand b/case-mmap-pread-rand index f6f7ced..0df5757 100755 --- a/case-mmap-pread-rand +++ b/case-mmap-pread-rand @@ -2,8 +2,8 @@ source ./hw_vars -create_sparse_file $SPARSE_FILE $((mem / 2)) +create_sparse_file $SPARSE_FILE $((ROTATE_BYTES)) -$USEMEM -n $nr_cpu -f $SPARSE_FILE --readonly --random $((mem / 2)) +$USEMEM -n $nr_cpu -f $SPARSE_FILE --readonly --random $((ROTATE_BYTES / nr_cpu)) rm $SPARSE_FILE diff --git a/case-mmap-pread-rand-mt b/case-mmap-pread-rand-mt index 9ec8a8b..d8de195 100755 --- a/case-mmap-pread-rand-mt +++ b/case-mmap-pread-rand-mt @@ -2,8 +2,8 @@ source ./hw_vars -create_sparse_file $SPARSE_FILE $((mem / 2)) +create_sparse_file $SPARSE_FILE $((ROTATE_BYTES / nr_cpu)) -$USEMEM -t $nr_cpu -f $SPARSE_FILE --readonly --random $((mem / 2)) +$USEMEM -t $nr_cpu -f $SPARSE_FILE --readonly --random $((ROTATE_BYTES / nr_cpu)) rm $SPARSE_FILE diff --git a/case-mmap-pread-seq b/case-mmap-pread-seq index 9e1c835..7931b67 100755 --- a/case-mmap-pread-seq +++ b/case-mmap-pread-seq @@ -2,8 +2,8 @@ source ./hw_vars -create_sparse_file $SPARSE_FILE $((mem / 2)) +create_sparse_file $SPARSE_FILE $((ROTATE_BYTES / nr_cpu)) -$USEMEM -n $nr_cpu -f $SPARSE_FILE --readonly $((mem / 2)) +$USEMEM -n $nr_cpu -f $SPARSE_FILE --readonly $((ROTATE_BYTES / nr_cpu)) rm $SPARSE_FILE diff --git a/case-mmap-pread-seq-mt b/case-mmap-pread-seq-mt index 84ef8ae..ed889e1 100755 --- a/case-mmap-pread-seq-mt +++ b/case-mmap-pread-seq-mt @@ -2,8 +2,8 @@ source ./hw_vars -create_sparse_file $SPARSE_FILE $((mem / 2)) +create_sparse_file $SPARSE_FILE $((ROTATE_BYTES / nr_cpu)) -$USEMEM -t $nr_cpu -f $SPARSE_FILE --readonly $((mem / 2)) +$USEMEM -t $nr_cpu -f $SPARSE_FILE --readonly $((ROTATE_BYTES / nr_cpu)) rm $SPARSE_FILE diff --git a/case-mmap-xread-rand-mt b/case-mmap-xread-rand-mt index 565d21f..5903c5c 100755 --- a/case-mmap-xread-rand-mt +++ b/case-mmap-xread-rand-mt @@ -2,8 +2,8 @@ source ./hw_vars -create_sparse_file $SPARSE_FILE $((mem / 2)) +create_sparse_file $SPARSE_FILE $((ROTATE_BYTES / nr_cpu)) -$USEMEM -t $nr_cpu -f $SPARSE_FILE --prealloc --readonly --random $((mem / 2)) +$USEMEM -t $nr_cpu -f $SPARSE_FILE --prealloc --readonly --random $((ROTATE_BYTES / nr_cpu)) rm $SPARSE_FILE diff --git a/case-mmap-xread-seq-mt b/case-mmap-xread-seq-mt index a38d326..b3ba903 100755 --- a/case-mmap-xread-seq-mt +++ b/case-mmap-xread-seq-mt @@ -2,8 +2,8 @@ source ./hw_vars -create_sparse_file $SPARSE_FILE $((mem / 2)) +create_sparse_file $SPARSE_FILE $((ROTATE_BYTES / nr_cpu)) -$USEMEM -t $nr_cpu -f $SPARSE_FILE --prealloc --readonly $((mem / 2)) +$USEMEM -t $nr_cpu -f $SPARSE_FILE --prealloc --readonly $((ROTATE_BYTES / nr_cpu)) rm $SPARSE_FILE diff --git a/case-mremap-xread-rand-mt b/case-mremap-xread-rand-mt index 255df22..4737393 100755 --- a/case-mremap-xread-rand-mt +++ b/case-mremap-xread-rand-mt @@ -12,8 +12,8 @@ source ./hw_vars for i in `seq $nr_cpu` do - create_sparse_file $SPARSE_FILE-$i $((mem / nr_cpu/ 10)) - $USEMEM -t $nr_cpu -f $SPARSE_FILE-$i -E --prealloc --readonly --random $((mem / nr_cpu / 10)) & + create_sparse_file $SPARSE_FILE-$i $ROTATE_BYTES + $USEMEM -t $nr_cpu -f $SPARSE_FILE-$i -E --prealloc --readonly --random $((ROTATE_BYTES / nr_cpu)) & done wait diff --git a/case-posix-advise b/case-posix-advise index 0e7996f..d5d68c0 100755 --- a/case-posix-advise +++ b/case-posix-advise @@ -10,11 +10,9 @@ source ./hw_vars -SIZE=$((mem / 40)) - for i in `seq $nr_cpu` do - create_sparse_file $SPARSE_FILE-$i $SIZE + create_sparse_file $SPARSE_FILE-$i $((ROTATE_BYTES / nr_cpu)) $USEMEM -D $SPARSE_FILE-$i --open-rw & done wait @@ -8,13 +8,10 @@ source ./hw_vars USEMEM_REMAP=./usemem_remap -SIZE=$((mem /nr_cpu / 10)) - - for i in $(seq $nr_cpu) do - create_sparse_file $SPARSE_FILE-$i $SIZE - $USEMEM_REMAP $SPARSE_FILE-$i $SIZE & + create_sparse_file $SPARSE_FILE-$i $ROTATE_BYTES + $USEMEM_REMAP $SPARSE_FILE-$i $((ROTATE_BYTES / nr_cpu)) & done wait diff --git a/case-small-allocs b/case-small-allocs index 606a669..a300875 100755 --- a/case-small-allocs +++ b/case-small-allocs @@ -5,4 +5,4 @@ source ./hw_vars -$USEMEM -n $nr_cpu --readonly --unit $((10 * pagesize)) $((10 * mem / nr_cpu)) +$USEMEM -n $nr_cpu --readonly --unit $((10 * pagesize)) $((ROTATE_BYTES / nr_cpu)) diff --git a/case-small-allocs-mt b/case-small-allocs-mt index e5e25b2..3396c7f 100755 --- a/case-small-allocs-mt +++ b/case-small-allocs-mt @@ -5,4 +5,4 @@ source ./hw_vars -$USEMEM -t $nr_cpu --readonly --unit $((10 * pagesize)) $((10 * mem / nr_cpu)) +$USEMEM -t $nr_cpu --readonly --unit $((10 * pagesize)) $((ROTATE_BYTES / nr_cpu)) @@ -73,3 +73,11 @@ done < /proc/meminfo mem=$((MemTotal << 10)) hugepagesize=$((Hugepagesize << 10)) + +if [[ $ROTATE_BYTES ]]; then + : +elif [[ $runtime ]]; then + ROTATE_BYTES=$((1<<48)) +else + ROTATE_BYTES=$mem +fi |