On Fri, Jun 30, 2017 at 11:07:35AM +0200, Johannes Thumshirn wrote:
Use nproc to get number of CPUs for fio jobs and introduce
_run_fio_rand_io helper for parallel IO which we don't really care about
the details and just want some IO.
Thanks, Johannes, applied with a fix below.
quoted hunk ↗ jump to hunk
Signed-off-by: Johannes Thumshirn <redacted>
---
common/fio | 7 +++++++
tests/block/005 | 4 +---
tests/block/006 | 2 +-
tests/block/008 | 4 +---
tests/block/011 | 5 ++---
5 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/common/fio b/common/fio
index 86ed4b2b7180..2b0759d19f5d 100644
--- a/common/fio
+++ b/common/fio
@@ -166,6 +166,13 @@ _run_fio() {
fio "${args[@]}" "$@"
}
+# Wrapper around _run_fio used if you need some I/O but don't really care much
+# about the details
+_run_fio_rand_io() {
+ _run_fio --bs=4k --rw=randread --norandommap --numjobs=$(nproc) \
+ --name=reads --direct=1
I added "$@" at the end here, it looks like that's what you intended and
it doesn't work otherwise.
+}
+