aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFengguang Wu <fengguang.wu@intel.com>2014-10-08 12:50:24 +0800
committerFengguang Wu <fengguang.wu@intel.com>2014-10-08 12:54:37 +0800
commit81acff3224431355039715ccb48ca4eff15e3c40 (patch)
tree85614d3a846dd9b0fe08406b1d567a092e6eb6de
parent5f2306517c82940c55731ed05a38da52a45958d7 (diff)
downloadvm-scalability-81acff3224431355039715ccb48ca4eff15e3c40.tar.gz
more accurate memory limit calculation for anon-r-seq cases
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
-rwxr-xr-xcase-anon-r-seq5
-rwxr-xr-xcase-anon-r-seq-mt4
-rwxr-xr-xhw_vars7
3 files changed, 14 insertions, 2 deletions
diff --git a/case-anon-r-seq b/case-anon-r-seq
index a72a3e3..1625d9a 100755
--- a/case-anon-r-seq
+++ b/case-anon-r-seq
@@ -2,4 +2,7 @@
source ./hw_vars
-$USEMEM -n $nr_cpu --readonly $((ROTATE_BYTES / nr_cpu))
+size=$((PTE_LIMIT / nr_cpu))
+(( size > AS_LIMIT )) && size=$AS_LIMIT
+
+$USEMEM -n $nr_cpu --readonly $size
diff --git a/case-anon-r-seq-mt b/case-anon-r-seq-mt
index a131923..4c4f0ad 100755
--- a/case-anon-r-seq-mt
+++ b/case-anon-r-seq-mt
@@ -2,4 +2,6 @@
source ./hw_vars
-$USEMEM -t $nr_cpu --readonly $((ROTATE_BYTES / nr_cpu))
+(( PTE_LIMIT > AS_LIMIT )) && PTE_LIMIT=$AS_LIMIT
+
+$USEMEM -t $nr_cpu --readonly $((PTE_LIMIT / nr_cpu))
diff --git a/hw_vars b/hw_vars
index bd3101a..68c9272 100755
--- a/hw_vars
+++ b/hw_vars
@@ -122,3 +122,10 @@ mem=$((MemTotal << 10))
hugepagesize=$((Hugepagesize << 10))
ROTATE_BYTES=$((1<<42))
+
+# Documentation/x86/x86_64/mm.txt
+# 0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm
+AS_LIMIT=$((1<<46))
+
+PTE_LIMIT=$((mem << 8))
+