diff options
author | Fengguang Wu <fengguang.wu@intel.com> | 2014-10-08 12:50:24 +0800 |
---|---|---|
committer | Fengguang Wu <fengguang.wu@intel.com> | 2014-10-08 12:54:37 +0800 |
commit | 81acff3224431355039715ccb48ca4eff15e3c40 (patch) | |
tree | 85614d3a846dd9b0fe08406b1d567a092e6eb6de | |
parent | 5f2306517c82940c55731ed05a38da52a45958d7 (diff) | |
download | vm-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-x | case-anon-r-seq | 5 | ||||
-rwxr-xr-x | case-anon-r-seq-mt | 4 | ||||
-rwxr-xr-x | hw_vars | 7 |
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)) @@ -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)) + |