aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2016-02-17 09:54:25 +0800
committerFengguang Wu <fengguang.wu@intel.com>2016-02-17 09:54:25 +0800
commit94d0f324adbf33e85e891ac89d7c743a2e2cebb9 (patch)
treea068f94d2eed430b4b9fdb2b1454d995c7d3d66c
parentb143340d6d812ab591c8a3c1669cd8f64bc69537 (diff)
downloadvm-scalability-94d0f324adbf33e85e891ac89d7c743a2e2cebb9.tar.gz
swap: give user the ability to control size
User can specify a value in the job file. This is mostly useful to do various testing, where the written size(pass_size) can play a role. Signed-off-by: Aaron Lu <aaron.lu@intel.com>
-rwxr-xr-xcase-swap-w-seq2
1 files changed, 1 insertions, 1 deletions
diff --git a/case-swap-w-seq b/case-swap-w-seq
index 351c6c7..6ad7c1e 100755
--- a/case-swap-w-seq
+++ b/case-swap-w-seq
@@ -7,7 +7,7 @@ if [ "$SwapTotal" -eq 0 ]; then
exit 1
fi
-pass_size=$(( ((MemAvailable + SwapTotal) << 10) * 3 / 4))
+[ -n "$pass_size" ] || pass_size=$(( ((MemAvailable + SwapTotal) << 10) * 3 / 4))
testcase=$(basename $0)
if [ "${testcase%-mt}" != "$testcase" ]; then