aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2017-04-07 13:32:23 +0800
committerFengguang Wu <fengguang.wu@intel.com>2017-04-07 13:55:16 +0800
commitb4f8f4eabebe21d6e9b90e51950238d7a04ef1b7 (patch)
tree64624ab012444baef9147699963d8f819f532dce
parent96dede76eb7861920387ed0b4bd950f6699ac10e (diff)
downloadvm-scalability-b4f8f4eabebe21d6e9b90e51950238d7a04ef1b7.tar.gz
case-anon-*w*: use unit_size instead of fixed mem/2
Like commit 195e6559d20e ("case-anon-w-rand: use unit_size instead of fixed $((mem / 2))"), this patch converts all anon write cases to respect unit_size environment variable. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
-rwxr-xr-xcase-anon-cow-rand3
-rwxr-xr-xcase-anon-cow-rand-mt3
-rwxr-xr-xcase-anon-cow-seq3
-rwxr-xr-xcase-anon-cow-seq-mt3
-rwxr-xr-xcase-anon-w-rand-mt3
-rwxr-xr-xcase-anon-w-seq3
-rwxr-xr-xcase-anon-w-seq-mt3
-rwxr-xr-xcase-anon-wx-rand-mt3
-rwxr-xr-xcase-anon-wx-seq-mt3
9 files changed, 18 insertions, 9 deletions
diff --git a/case-anon-cow-rand b/case-anon-cow-rand
index de35b06..db03483 100755
--- a/case-anon-cow-rand
+++ b/case-anon-cow-rand
@@ -2,4 +2,5 @@
. ./hw_vars
-$USEMEM -n $nr_task --prealloc --prefault --random $((mem / nr_task / 2))
+[ -n "$unit_size" ] || unit_size=$((mem / 2))
+$USEMEM -n $nr_task --prealloc --prefault --random $((unit_size / nr_task))
diff --git a/case-anon-cow-rand-mt b/case-anon-cow-rand-mt
index b47d810..fe58488 100755
--- a/case-anon-cow-rand-mt
+++ b/case-anon-cow-rand-mt
@@ -2,4 +2,5 @@
. ./hw_vars
-$USEMEM -t $nr_task --prealloc --prefault --random $((mem / 2))
+[ -n "$unit_size" ] || unit_size=$((mem / 2))
+$USEMEM -t $nr_task --prealloc --prefault --random $unit_size
diff --git a/case-anon-cow-seq b/case-anon-cow-seq
index b687c79..70c2ccc 100755
--- a/case-anon-cow-seq
+++ b/case-anon-cow-seq
@@ -2,4 +2,5 @@
. ./hw_vars
-$USEMEM -n $nr_task --prealloc --prefault $((mem / nr_task / 2))
+[ -n "$unit_size" ] || unit_size=$((mem / 2))
+$USEMEM -n $nr_task --prealloc --prefault $((unit_size / nr_task))
diff --git a/case-anon-cow-seq-mt b/case-anon-cow-seq-mt
index 5ac4c0e..df05b5b 100755
--- a/case-anon-cow-seq-mt
+++ b/case-anon-cow-seq-mt
@@ -2,4 +2,5 @@
. ./hw_vars
-$USEMEM -t $nr_task --prealloc --prefault $((mem / 2))
+[ -n "$unit_size" ] || unit_size=$((mem / 2))
+$USEMEM -t $nr_task --prealloc --prefault $unit_size
diff --git a/case-anon-w-rand-mt b/case-anon-w-rand-mt
index dfdb0a0..afbcc24 100755
--- a/case-anon-w-rand-mt
+++ b/case-anon-w-rand-mt
@@ -2,4 +2,5 @@
. ./hw_vars
-$USEMEM -t $nr_task --random $((mem / nr_task / 2))
+[ -n "$unit_size" ] || unit_size=$((mem / 2))
+$USEMEM -t $nr_task --random $((unit_size / nr_task))
diff --git a/case-anon-w-seq b/case-anon-w-seq
index bdf307a..e0e2be5 100755
--- a/case-anon-w-seq
+++ b/case-anon-w-seq
@@ -2,4 +2,5 @@
. ./hw_vars
-$USEMEM -n $nr_task $((mem / nr_task / 2))
+[ -n "$unit_size" ] || unit_size=$((mem / 2))
+$USEMEM -n $nr_task $((unit_size / nr_task))
diff --git a/case-anon-w-seq-mt b/case-anon-w-seq-mt
index f8c434f..999aadc 100755
--- a/case-anon-w-seq-mt
+++ b/case-anon-w-seq-mt
@@ -2,4 +2,5 @@
. ./hw_vars
-$USEMEM -t $nr_task $((mem / nr_task / 2))
+[ -n "$unit_size" ] || unit_size=$((mem / 2))
+$USEMEM -t $nr_task $((unit_size / nr_task))
diff --git a/case-anon-wx-rand-mt b/case-anon-wx-rand-mt
index 76171b6..32aac9e 100755
--- a/case-anon-wx-rand-mt
+++ b/case-anon-wx-rand-mt
@@ -2,4 +2,5 @@
. ./hw_vars
-$USEMEM -t $nr_task --prealloc --random $((mem / nr_task / 2))
+[ -n "$unit_size" ] || unit_size=$((mem / 2))
+$USEMEM -t $nr_task --prealloc --random $((unit_size / nr_task))
diff --git a/case-anon-wx-seq-mt b/case-anon-wx-seq-mt
index 076fc9b..c7d53a8 100755
--- a/case-anon-wx-seq-mt
+++ b/case-anon-wx-seq-mt
@@ -2,4 +2,5 @@
. ./hw_vars
-$USEMEM -t $nr_task --prealloc $((mem / 2))
+[ -n "$unit_size" ] || unit_size=$((mem / 2))
+$USEMEM -t $nr_task --prealloc $unit_size