|
|
7de399 |
From fd56c235caa42870e6dc33d661514375ea95ffc5 Mon Sep 17 00:00:00 2001
|
|
|
7de399 |
From: =?UTF-8?q?Andr=C3=A9=20Wild?= <wild.andre.ae@gmail.com>
|
|
|
7de399 |
Date: Fri, 14 Aug 2020 15:52:09 +0200
|
|
|
7de399 |
Subject: [PATCH] thread_options: Use unsigned int type for exit_what and
|
|
|
7de399 |
stonewall
|
|
|
7de399 |
MIME-Version: 1.0
|
|
|
7de399 |
Content-Type: text/plain; charset=UTF-8
|
|
|
7de399 |
Content-Transfer-Encoding: 8bit
|
|
|
7de399 |
|
|
|
7de399 |
Fixes: 64402a8 ("Expand choices for exitall")
|
|
|
7de399 |
Fixes: https://github.com/axboe/fio/issues/1065
|
|
|
7de399 |
Signed-off-by: André Wild <wild.andre.ae@gmail.com>
|
|
|
7de399 |
---
|
|
|
7de399 |
cconv.c | 8 ++++----
|
|
|
7de399 |
examples/exitwhat.fio | 8 ++++----
|
|
|
7de399 |
fio.1 | 29 +++++++++++++++++++++--------
|
|
|
7de399 |
server.h | 2 +-
|
|
|
7de399 |
thread_options.h | 9 ++++-----
|
|
|
7de399 |
5 files changed, 34 insertions(+), 22 deletions(-)
|
|
|
7de399 |
|
|
|
7de399 |
diff --git a/cconv.c b/cconv.c
|
|
|
7de399 |
index 2469389b..4b0c3490 100644
|
|
|
7de399 |
--- a/cconv.c
|
|
|
7de399 |
+++ b/cconv.c
|
|
|
7de399 |
@@ -237,8 +237,8 @@ void convert_thread_options_to_cpu(struct thread_options *o,
|
|
|
7de399 |
o->loops = le32_to_cpu(top->loops);
|
|
|
7de399 |
o->mem_type = le32_to_cpu(top->mem_type);
|
|
|
7de399 |
o->mem_align = le32_to_cpu(top->mem_align);
|
|
|
7de399 |
- o->exit_what = le16_to_cpu(top->exit_what);
|
|
|
7de399 |
- o->stonewall = le16_to_cpu(top->stonewall);
|
|
|
7de399 |
+ o->exit_what = le32_to_cpu(top->exit_what);
|
|
|
7de399 |
+ o->stonewall = le32_to_cpu(top->stonewall);
|
|
|
7de399 |
o->new_group = le32_to_cpu(top->new_group);
|
|
|
7de399 |
o->numjobs = le32_to_cpu(top->numjobs);
|
|
|
7de399 |
o->cpus_allowed_policy = le32_to_cpu(top->cpus_allowed_policy);
|
|
|
7de399 |
@@ -437,8 +437,8 @@ void convert_thread_options_to_net(struct thread_options_pack *top,
|
|
|
7de399 |
top->loops = cpu_to_le32(o->loops);
|
|
|
7de399 |
top->mem_type = cpu_to_le32(o->mem_type);
|
|
|
7de399 |
top->mem_align = cpu_to_le32(o->mem_align);
|
|
|
7de399 |
- top->exit_what = cpu_to_le16(o->exit_what);
|
|
|
7de399 |
- top->stonewall = cpu_to_le16(o->stonewall);
|
|
|
7de399 |
+ top->exit_what = cpu_to_le32(o->exit_what);
|
|
|
7de399 |
+ top->stonewall = cpu_to_le32(o->stonewall);
|
|
|
7de399 |
top->new_group = cpu_to_le32(o->new_group);
|
|
|
7de399 |
top->numjobs = cpu_to_le32(o->numjobs);
|
|
|
7de399 |
top->cpus_allowed_policy = cpu_to_le32(o->cpus_allowed_policy);
|
|
|
7de399 |
diff --git a/examples/exitwhat.fio b/examples/exitwhat.fio
|
|
|
7de399 |
index a1099f0f..c91d7375 100644
|
|
|
7de399 |
--- a/examples/exitwhat.fio
|
|
|
7de399 |
+++ b/examples/exitwhat.fio
|
|
|
7de399 |
@@ -1,7 +1,7 @@
|
|
|
7de399 |
# We want to run fast1 as long as slow1 is running, but also have a cumulative
|
|
|
7de399 |
# report of fast1 (group_reporting=1/new_group=1). exitall=1 would not cause
|
|
|
7de399 |
# fast1 to stop after slow1 is done. Setting exit_what=stonewall will cause
|
|
|
7de399 |
-# alls jobs up until the next stonewall=1 setting to be stopped, when job slow1
|
|
|
7de399 |
+# alls jobs up until the next stonewall setting to be stopped, when job slow1
|
|
|
7de399 |
# finishes.
|
|
|
7de399 |
# In this example skipping forward to slow2/fast2. slow2 has exit_what=all set,
|
|
|
7de399 |
# which means all jobs will be cancelled when slow2 finishes. In particular,
|
|
|
7de399 |
@@ -15,7 +15,7 @@ group_reporting=1
|
|
|
7de399 |
exitall=1
|
|
|
7de399 |
|
|
|
7de399 |
[slow1]
|
|
|
7de399 |
-rw=r
|
|
|
7de399 |
+rw=read
|
|
|
7de399 |
numjobs=1
|
|
|
7de399 |
ioengine=sync
|
|
|
7de399 |
new_group=1
|
|
|
7de399 |
@@ -32,8 +32,8 @@ iodepth=32
|
|
|
7de399 |
rate=300,300,300
|
|
|
7de399 |
|
|
|
7de399 |
[slow2]
|
|
|
7de399 |
-stonewall=1
|
|
|
7de399 |
-rw=w
|
|
|
7de399 |
+stonewall
|
|
|
7de399 |
+rw=write
|
|
|
7de399 |
numjobs=1
|
|
|
7de399 |
ioengine=sync
|
|
|
7de399 |
new_group=1
|
|
|
7de399 |
diff --git a/fio.1 b/fio.1
|
|
|
7de399 |
index cdd105d7..1c90e4a5 100644
|
|
|
7de399 |
--- a/fio.1
|
|
|
7de399 |
+++ b/fio.1
|
|
|
7de399 |
@@ -2569,7 +2569,8 @@ been exceeded before retrying operations.
|
|
|
7de399 |
Wait for preceding jobs in the job file to exit, before starting this
|
|
|
7de399 |
one. Can be used to insert serialization points in the job file. A stone
|
|
|
7de399 |
wall also implies starting a new reporting group, see
|
|
|
7de399 |
-\fBgroup_reporting\fR.
|
|
|
7de399 |
+\fBgroup_reporting\fR. Optionally you can use `stonewall=0` to disable or
|
|
|
7de399 |
+`stonewall=1` to enable it.
|
|
|
7de399 |
.TP
|
|
|
7de399 |
.BI exitall
|
|
|
7de399 |
By default, fio will continue running all other jobs when one job finishes.
|
|
|
7de399 |
@@ -2577,15 +2578,27 @@ Sometimes this is not the desired action. Setting \fBexitall\fR will instead
|
|
|
7de399 |
make fio terminate all jobs in the same group, as soon as one job of that
|
|
|
7de399 |
group finishes.
|
|
|
7de399 |
.TP
|
|
|
7de399 |
-.BI exit_what
|
|
|
7de399 |
+.BI exit_what \fR=\fPstr
|
|
|
7de399 |
By default, fio will continue running all other jobs when one job finishes.
|
|
|
7de399 |
-Sometimes this is not the desired action. Setting \fBexit_all\fR will instead
|
|
|
7de399 |
+Sometimes this is not the desired action. Setting \fBexitall\fR will instead
|
|
|
7de399 |
make fio terminate all jobs in the same group. The option \fBexit_what\fR
|
|
|
7de399 |
-allows to control which jobs get terminated when \fBexitall\fR is enabled. The
|
|
|
7de399 |
-default is \fBgroup\fR and does not change the behaviour of \fBexitall\fR. The
|
|
|
7de399 |
-setting \fBall\fR terminates all jobs. The setting \fBstonewall\fR terminates
|
|
|
7de399 |
-all currently running jobs across all groups and continues execution with the
|
|
|
7de399 |
-next stonewalled group.
|
|
|
7de399 |
+allows you to control which jobs get terminated when \fBexitall\fR is enabled.
|
|
|
7de399 |
+The default value is \fBgroup\fR.
|
|
|
7de399 |
+The allowed values are:
|
|
|
7de399 |
+.RS
|
|
|
7de399 |
+.RS
|
|
|
7de399 |
+.TP
|
|
|
7de399 |
+.B all
|
|
|
7de399 |
+terminates all jobs.
|
|
|
7de399 |
+.TP
|
|
|
7de399 |
+.B group
|
|
|
7de399 |
+is the default and does not change the behaviour of \fBexitall\fR.
|
|
|
7de399 |
+.TP
|
|
|
7de399 |
+.B stonewall
|
|
|
7de399 |
+terminates all currently running jobs across all groups and continues
|
|
|
7de399 |
+execution with the next stonewalled group.
|
|
|
7de399 |
+.RE
|
|
|
7de399 |
+.RE
|
|
|
7de399 |
.TP
|
|
|
7de399 |
.BI exec_prerun \fR=\fPstr
|
|
|
7de399 |
Before running this job, issue the command specified through
|
|
|
7de399 |
diff --git a/server.h b/server.h
|
|
|
7de399 |
index de01a5c8..efa70e7c 100644
|
|
|
7de399 |
--- a/server.h
|
|
|
7de399 |
+++ b/server.h
|
|
|
7de399 |
@@ -48,7 +48,7 @@ struct fio_net_cmd_reply {
|
|
|
7de399 |
};
|
|
|
7de399 |
|
|
|
7de399 |
enum {
|
|
|
7de399 |
- FIO_SERVER_VER = 83,
|
|
|
7de399 |
+ FIO_SERVER_VER = 84,
|
|
|
7de399 |
|
|
|
7de399 |
FIO_SERVER_MAX_FRAGMENT_PDU = 1024,
|
|
|
7de399 |
FIO_SERVER_MAX_CMD_MB = 2048,
|
|
|
7de399 |
diff --git a/thread_options.h b/thread_options.h
|
|
|
7de399 |
index 3fe48ecc..14f1cbe9 100644
|
|
|
7de399 |
--- a/thread_options.h
|
|
|
7de399 |
+++ b/thread_options.h
|
|
|
7de399 |
@@ -202,8 +202,8 @@ struct thread_options {
|
|
|
7de399 |
|
|
|
7de399 |
unsigned long long max_latency;
|
|
|
7de399 |
|
|
|
7de399 |
- unsigned short exit_what;
|
|
|
7de399 |
- unsigned short stonewall;
|
|
|
7de399 |
+ unsigned int exit_what;
|
|
|
7de399 |
+ unsigned int stonewall;
|
|
|
7de399 |
unsigned int new_group;
|
|
|
7de399 |
unsigned int numjobs;
|
|
|
7de399 |
os_cpu_mask_t cpumask;
|
|
|
7de399 |
@@ -494,8 +494,8 @@ struct thread_options_pack {
|
|
|
7de399 |
uint32_t mem_type;
|
|
|
7de399 |
uint32_t mem_align;
|
|
|
7de399 |
|
|
|
7de399 |
- uint16_t exit_what;
|
|
|
7de399 |
- uint16_t stonewall;
|
|
|
7de399 |
+ uint32_t exit_what;
|
|
|
7de399 |
+ uint32_t stonewall;
|
|
|
7de399 |
uint32_t new_group;
|
|
|
7de399 |
uint32_t numjobs;
|
|
|
7de399 |
/*
|
|
|
7de399 |
@@ -546,7 +546,6 @@ struct thread_options_pack {
|
|
|
7de399 |
uint32_t lat_percentiles;
|
|
|
7de399 |
uint32_t slat_percentiles;
|
|
|
7de399 |
uint32_t percentile_precision;
|
|
|
7de399 |
- uint32_t pad3;
|
|
|
7de399 |
fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN];
|
|
|
7de399 |
|
|
|
7de399 |
uint8_t read_iolog_file[FIO_TOP_STR_MAX];
|
|
|
7de399 |
--
|
|
|
7de399 |
2.17.0
|
|
|
7de399 |
|