aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFengguang Wu <fengguang.wu@intel.com>2012-11-27 20:21:57 +0800
committerFengguang Wu <fengguang.wu@intel.com>2012-11-27 20:29:22 +0800
commit10a5084e044161253d9e9be23d6e5f6f0a64b335 (patch)
tree8051c36ece8fc487891c351b42ba0ac3278b189f
parent46d54e7dfafbdb592617d29b2c2af2f9ba99ce08 (diff)
downloadvm-scalability-10a5084e044161253d9e9be23d6e5f6f0a64b335.tar.gz
Abhinav's work on case-mremap-xread-rand-mt
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
-rw-r--r--case-mremap-xread-rand-mt20
1 files changed, 20 insertions, 0 deletions
diff --git a/case-mremap-xread-rand-mt b/case-mremap-xread-rand-mt
new file mode 100644
index 0000000..255df22
--- /dev/null
+++ b/case-mremap-xread-rand-mt
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+#
+# Exercises code in mremap.c of mm/
+#
+# First creates a sparse file and then maps it to the VM of calling
+#
+# process. Then remaps it after scaling it by SCALE_FACTOR defined in usemem.
+#
+
+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)) &
+done
+wait
+
+rm $SPARSE_FILE-*