Thread (3 messages) 3 messages, 2 authors, 2017-07-14

Re: [PATCH blktests v2] tests: use nproc to get number of CPUs for fio jobs

From: Omar Sandoval <osandov@osandov.com>
Date: 2017-07-14 17:11:14

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.
+}
+
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help