Compare commits

...

No commits in common. "imports/c9-beta/fio-3.27-8.el9" and "c8" have entirely different histories.

12 changed files with 528 additions and 498 deletions

View File

@ -1 +1 @@
3c8226d83248b4f788b628207934ad766e17c72f SOURCES/fio-3.27.tar.bz2
cad3b3d78c5c2c9a116ee53642eec17a77c5ead2 SOURCES/fio-3.19.tar.bz2

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/fio-3.27.tar.bz2
SOURCES/fio-3.19.tar.bz2

View File

@ -0,0 +1,187 @@
From e1bcd541f63f9029f6c50116831303ad06292edc Mon Sep 17 00:00:00 2001
From: Song Liu <songliubraving@fb.com>
Date: Sun, 17 May 2020 22:39:49 -0700
Subject: [PATCH] Add option latency_run to continue enable latency_target
Currently, latency_target run will exist once fio find the highest queue
depth that meets latency_target. Add option latency_run. If set, fio will
continue running and try to meet latency_target by adusting queue depth.
Signed-off-by: Song Liu <songliubraving@fb.com>
---
HOWTO | 7 +++++++
cconv.c | 2 ++
fio.1 | 5 +++++
fio.h | 1 +
io_u.c | 18 +++++++++++++++++-
options.c | 10 ++++++++++
server.h | 2 +-
thread_options.h | 2 ++
8 files changed, 45 insertions(+), 2 deletions(-)
diff --git a/HOWTO b/HOWTO
index 430c7b62..f0b4ffe4 100644
--- a/HOWTO
+++ b/HOWTO
@@ -2551,6 +2551,13 @@ I/O latency
defaults to 100.0, meaning that all I/Os must be equal or below to the value
set by :option:`latency_target`.
+.. option:: latency_run=bool
+
+ Used with :option:`latency_target`. If false (default), fio will find
+ the highest queue depth that meets :option:`latency_target` and exit. If
+ true, fio will continue running and try to meet :option:`latency_target`
+ by adjusting queue depth.
+
.. option:: max_latency=time
If set, fio will exit the job with an ETIMEDOUT error if it exceeds this
diff --git a/cconv.c b/cconv.c
index 48218dc4..449bcf7b 100644
--- a/cconv.c
+++ b/cconv.c
@@ -288,6 +288,7 @@ void convert_thread_options_to_cpu(struct thread_options *o,
o->latency_window = le64_to_cpu(top->latency_window);
o->max_latency = le64_to_cpu(top->max_latency);
o->latency_percentile.u.f = fio_uint64_to_double(le64_to_cpu(top->latency_percentile.u.i));
+ o->latency_run = le32_to_cpu(top->latency_run);
o->compress_percentage = le32_to_cpu(top->compress_percentage);
o->compress_chunk = le32_to_cpu(top->compress_chunk);
o->dedupe_percentage = le32_to_cpu(top->dedupe_percentage);
@@ -487,6 +488,7 @@ void convert_thread_options_to_net(struct thread_options_pack *top,
top->latency_window = __cpu_to_le64(o->latency_window);
top->max_latency = __cpu_to_le64(o->max_latency);
top->latency_percentile.u.i = __cpu_to_le64(fio_double_to_uint64(o->latency_percentile.u.f));
+ top->latency_run = __cpu_to_le32(o->latency_run);
top->compress_percentage = cpu_to_le32(o->compress_percentage);
top->compress_chunk = cpu_to_le32(o->compress_chunk);
top->dedupe_percentage = cpu_to_le32(o->dedupe_percentage);
diff --git a/fio.1 b/fio.1
index a2379f98..3a7a359b 100644
--- a/fio.1
+++ b/fio.1
@@ -2275,6 +2275,11 @@ The percentage of I/Os that must fall within the criteria specified by
defaults to 100.0, meaning that all I/Os must be equal or below to the value
set by \fBlatency_target\fR.
.TP
+.BI latency_run \fR=\fPbool
+Used with \fBlatency_target\fR. If false (default), fio will find the highest
+queue depth that meets \fBlatency_target\fR and exit. If true, fio will continue
+running and try to meet \fBlatency_target\fR by adjusting queue depth.
+.TP
.BI max_latency \fR=\fPtime
If set, fio will exit the job with an ETIMEDOUT error if it exceeds this
maximum latency. When the unit is omitted, the value is interpreted in
diff --git a/fio.h b/fio.h
index bbf057c1..7610026d 100644
--- a/fio.h
+++ b/fio.h
@@ -377,6 +377,7 @@ struct thread_data {
unsigned int latency_qd_high;
unsigned int latency_qd_low;
unsigned int latency_failed;
+ unsigned int latency_stable_count;
uint64_t latency_ios;
int latency_end_run;
diff --git a/io_u.c b/io_u.c
index aa8808b8..ae1438fd 100644
--- a/io_u.c
+++ b/io_u.c
@@ -1391,6 +1391,7 @@ static bool __lat_target_failed(struct thread_data *td)
td->latency_qd_low--;
td->latency_qd = (td->latency_qd + td->latency_qd_low) / 2;
+ td->latency_stable_count = 0;
dprint(FD_RATE, "Ramped down: %d %d %d\n", td->latency_qd_low, td->latency_qd, td->latency_qd_high);
@@ -1440,6 +1441,21 @@ static void lat_target_success(struct thread_data *td)
td->latency_qd_low = td->latency_qd;
+ if (td->latency_qd + 1 == td->latency_qd_high) {
+ /*
+ * latency_qd will not incease on lat_target_success(), so
+ * called stable. If we stick with this queue depth, the
+ * final latency is likely lower than latency_target. Fix
+ * this by increasing latency_qd_high slowly. Use a naive
+ * heuristic here. If we get lat_target_success() 3 times
+ * in a row, increase latency_qd_high by 1.
+ */
+ if (++td->latency_stable_count >= 3) {
+ td->latency_qd_high++;
+ td->latency_stable_count = 0;
+ }
+ }
+
/*
* If we haven't failed yet, we double up to a failing value instead
* of bisecting from highest possible queue depth. If we have set
@@ -1459,7 +1475,7 @@ static void lat_target_success(struct thread_data *td)
* Same as last one, we are done. Let it run a latency cycle, so
* we get only the results from the targeted depth.
*/
- if (td->latency_qd == qd) {
+ if (!o->latency_run && td->latency_qd == qd) {
if (td->latency_end_run) {
dprint(FD_RATE, "We are done\n");
td->done = 1;
diff --git a/options.c b/options.c
index b18cea33..da401aed 100644
--- a/options.c
+++ b/options.c
@@ -3672,6 +3672,16 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
.category = FIO_OPT_C_IO,
.group = FIO_OPT_G_LATPROF,
},
+ {
+ .name = "latency_run",
+ .lname = "Latency Run",
+ .type = FIO_OPT_BOOL,
+ .off1 = offsetof(struct thread_options, latency_run),
+ .help = "Keep adjusting queue depth to match latency_target",
+ .def = "0",
+ .category = FIO_OPT_C_IO,
+ .group = FIO_OPT_G_LATPROF,
+ },
{
.name = "invalidate",
.lname = "Cache invalidate",
diff --git a/server.h b/server.h
index 279b6917..de01a5c8 100644
--- a/server.h
+++ b/server.h
@@ -48,7 +48,7 @@ struct fio_net_cmd_reply {
};
enum {
- FIO_SERVER_VER = 82,
+ FIO_SERVER_VER = 83,
FIO_SERVER_MAX_FRAGMENT_PDU = 1024,
FIO_SERVER_MAX_CMD_MB = 2048,
diff --git a/thread_options.h b/thread_options.h
index c78ed43d..09ccd5b2 100644
--- a/thread_options.h
+++ b/thread_options.h
@@ -324,6 +324,7 @@ struct thread_options {
unsigned long long latency_target;
unsigned long long latency_window;
fio_fp64_t latency_percentile;
+ uint32_t latency_run;
unsigned int sig_figs;
@@ -612,6 +613,7 @@ struct thread_options_pack {
uint64_t latency_window;
uint64_t max_latency;
fio_fp64_t latency_percentile;
+ uint32_t latency_run;
uint32_t sig_figs;
--
2.17.0

View File

@ -0,0 +1,37 @@
From 8644ef7c4c49aa6d6492b3b250a06b841496d7fd Mon Sep 17 00:00:00 2001
From: Bart Van Assche <bvanassche@acm.org>
Date: Sat, 27 Jun 2020 07:26:24 -0700
Subject: [PATCH] Unbreak the pmemblk engine
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Fixes: e9c7be0e32e6 ("pmemblk: Fix a memory leak")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
engines/pmemblk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/engines/pmemblk.c b/engines/pmemblk.c
index 730f4d7..e2eaa15 100644
--- a/engines/pmemblk.c
+++ b/engines/pmemblk.c
@@ -220,14 +220,14 @@ static fio_pmemblk_file_t pmb_open(const char *pathspec, int flags)
pmb->pmb_nblocks = pmemblk_nblock(pmb->pmb_pool);
fio_pmemblk_cache_insert(pmb);
+ } else {
+ free(path);
}
pmb->pmb_refcnt += 1;
pthread_mutex_unlock(&CacheLock);
- free(path);
-
return pmb;
error:
--
2.9.5

View File

@ -1,133 +0,0 @@
From 382975557e632efb506836bc1709789e615c9094 Mon Sep 17 00:00:00 2001
From: Eric Sandeen <esandeen@redhat.com>
Date: Tue, 3 Aug 2021 10:23:35 -0700
Subject: [PATCH] fio: remove raw device support
As of Linux kernel commit 603e4922f1c ("remove the raw driver"),
linux/raw.h is gone, and raw device support no longer exists.
Because of this, fio can no longer build against the current Linux
kernel headers.
So, remove raw device support from fio as well.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
diskutil.c | 10 +++-------
fio.1 | 4 +---
os/os-linux.h | 32 --------------------------------
os/os.h | 4 ----
4 files changed, 4 insertions(+), 46 deletions(-)
diff --git a/diskutil.c b/diskutil.c
index 0051a7a0..ace7af3d 100644
--- a/diskutil.c
+++ b/diskutil.c
@@ -166,14 +166,10 @@ static int get_device_numbers(char *file_name, int *maj, int *min)
if (S_ISBLK(st.st_mode)) {
majdev = major(st.st_rdev);
mindev = minor(st.st_rdev);
- } else if (S_ISCHR(st.st_mode)) {
- majdev = major(st.st_rdev);
- mindev = minor(st.st_rdev);
- if (fio_lookup_raw(st.st_rdev, &majdev, &mindev))
- return -1;
- } else if (S_ISFIFO(st.st_mode))
+ } else if (S_ISCHR(st.st_mode) ||
+ S_ISFIFO(st.st_mode)) {
return -1;
- else {
+ } else {
majdev = major(st.st_dev);
mindev = minor(st.st_dev);
}
diff --git a/fio.1 b/fio.1
index 6cc82542..9c12ad13 100644
--- a/fio.1
+++ b/fio.1
@@ -1700,9 +1700,7 @@ Sets size to something really large and waits for ENOSPC (no space left on
device) or EDQUOT (disk quota exceeded)
as the terminating condition. Only makes sense with sequential
write. For a read workload, the mount point will be filled first then I/O
-started on the result. This option doesn't make sense if operating on a raw
-device node, since the size of that is already known by the file system.
-Additionally, writing beyond end-of-device will not return ENOSPC there.
+started on the result.
.SS "I/O engine"
.TP
.BI ioengine \fR=\fPstr
diff --git a/os/os-linux.h b/os/os-linux.h
index f7137abe..16ed5258 100644
--- a/os/os-linux.h
+++ b/os/os-linux.h
@@ -14,7 +14,6 @@
#include <errno.h>
#include <sched.h>
#include <linux/unistd.h>
-#include <linux/raw.h>
#include <linux/major.h>
#include <linux/fs.h>
#include <scsi/sg.h>
@@ -41,7 +40,6 @@
#define FIO_HAVE_IOSCHED_SWITCH
#define FIO_HAVE_ODIRECT
#define FIO_HAVE_HUGETLB
-#define FIO_HAVE_RAWBIND
#define FIO_HAVE_BLKTRACE
#define FIO_HAVE_CL_SIZE
#define FIO_HAVE_CGROUPS
@@ -178,36 +176,6 @@ static inline unsigned long long os_phys_mem(void)
return (unsigned long long) pages * (unsigned long long) pagesize;
}
-static inline int fio_lookup_raw(dev_t dev, int *majdev, int *mindev)
-{
- struct raw_config_request rq;
- int fd;
-
- if (major(dev) != RAW_MAJOR)
- return 1;
-
- /*
- * we should be able to find /dev/rawctl or /dev/raw/rawctl
- */
- fd = open("/dev/rawctl", O_RDONLY);
- if (fd < 0) {
- fd = open("/dev/raw/rawctl", O_RDONLY);
- if (fd < 0)
- return 1;
- }
-
- rq.raw_minor = minor(dev);
- if (ioctl(fd, RAW_GETBIND, &rq) < 0) {
- close(fd);
- return 1;
- }
-
- close(fd);
- *majdev = rq.block_major;
- *mindev = rq.block_minor;
- return 0;
-}
-
#ifdef O_NOATIME
#define FIO_O_NOATIME O_NOATIME
#else
diff --git a/os/os.h b/os/os.h
index e47d3d97..17daf91d 100644
--- a/os/os.h
+++ b/os/os.h
@@ -157,10 +157,6 @@ extern int fio_cpus_split(os_cpu_mask_t *mask, unsigned int cpu);
#define OS_RAND_MAX RAND_MAX
#endif
-#ifndef FIO_HAVE_RAWBIND
-#define fio_lookup_raw(dev, majdev, mindev) 1
-#endif
-
#ifndef FIO_PREFERRED_ENGINE
#define FIO_PREFERRED_ENGINE "psync"
#endif
--
2.17.0

View File

@ -1,30 +0,0 @@
From 2b3d4a6a924e0aa82654d3b96fb134085af7a98a Mon Sep 17 00:00:00 2001
From: Eric Sandeen <esandeen@redhat.com>
Date: Wed, 26 Jan 2022 08:49:45 -0600
Subject: [PATCH] fio: use LDFLAGS when linking dynamic engines
Without this, locally defined LDFLAGS won't be applied when
linking the dynamically loaded IO engines.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 76eb0d7d..00e79539 100644
--- a/Makefile
+++ b/Makefile
@@ -295,7 +295,7 @@ define engine_template =
$(1)_OBJS := $$($(1)_SRCS:.c=.o)
$$($(1)_OBJS): CFLAGS := -fPIC $$($(1)_CFLAGS) $(CFLAGS)
engines/fio-$(1).so: $$($(1)_OBJS)
- $$(QUIET_LINK)$(CC) -shared -rdynamic -fPIC -Wl,-soname,fio-$(1).so.1 -o $$@ $$< $$($(1)_LIBS)
+ $$(QUIET_LINK)$(CC) $(LDFLAGS) -shared -rdynamic -fPIC -Wl,-soname,fio-$(1).so.1 -o $$@ $$< $$($(1)_LIBS)
ENGS_OBJS += engines/fio-$(1).so
endef
else # !CONFIG_DYNAMIC_ENGINES
--
2.31.1

View File

@ -0,0 +1,28 @@
From 2e3fb343ec883674a4927f2da983759bf90a0671 Mon Sep 17 00:00:00 2001
From: Song Liu <songliubraving@fb.com>
Date: Sun, 17 May 2020 22:46:21 -0700
Subject: [PATCH] init: fix unit of latency_window
latency_window has unit of microseconds, and is compared against
usec_window. Therefore, there is no need to fix it up to nanoseconds.
Signed-off-by: Song Liu <songliubraving@fb.com>
---
init.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/init.c b/init.c
index b5315334..0431f700 100644
--- a/init.c
+++ b/init.c
@@ -956,7 +956,6 @@ static int fixup_options(struct thread_data *td)
*/
o->max_latency *= 1000ULL;
o->latency_target *= 1000ULL;
- o->latency_window *= 1000ULL;
return ret;
}
--
2.17.0

View File

@ -1,51 +0,0 @@
From 2459bd33b3dbb7a34f28c612d595311a6bc7593d Mon Sep 17 00:00:00 2001
From: Vincent Fu <vincent.fu@samsung.com>
Date: Wed, 4 Aug 2021 18:29:05 +0000
Subject: [PATCH] ioengines: fix crash with --enghelp option
Since f6931a1dd35896433c8cc2e10de51372a2c496c4 commands like the
following segfault:
fio --enghelp=sg
fio --enghelp=sg,sg_write_mode
This is because free_ioengine() assumes that td->io_ops is not NULL.
Make this true when free_ioengine() is called by
fio_show_ioengine_help() to avoid the crash.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
ioengines.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/ioengines.c b/ioengines.c
index dd61af07..d08a511a 100644
--- a/ioengines.c
+++ b/ioengines.c
@@ -692,17 +692,17 @@ int fio_show_ioengine_help(const char *engine)
}
td.o.ioengine = (char *)engine;
- io_ops = load_ioengine(&td);
+ td.io_ops = load_ioengine(&td);
- if (!io_ops) {
+ if (!td.io_ops) {
log_info("IO engine %s not found\n", engine);
return 1;
}
- if (io_ops->options)
- ret = show_cmd_help(io_ops->options, sep);
+ if (td.io_ops->options)
+ ret = show_cmd_help(td.io_ops->options, sep);
else
- log_info("IO engine %s has no options\n", io_ops->name);
+ log_info("IO engine %s has no options\n", td.io_ops->name);
free_ioengine(&td);
return ret;
--
2.17.0

View File

@ -21,14 +21,14 @@ path behind runtime detection of PMULL.
Fixes: https://github.com/axboe/fio/issues/1239
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Pavel Reichl <preichl@redhat.com>
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
os/os-linux.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/os/os-linux.h b/os/os-linux.h
index 808f1d022..3001140ca 100644
index 808f1d02..3001140c 100644
--- a/os/os-linux.h
+++ b/os/os-linux.h
@@ -20,6 +20,9 @@
@ -51,3 +51,6 @@ index 808f1d022..3001140ca 100644
break;
#endif
default:
--
2.38.1

View File

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

View File

@ -0,0 +1,52 @@
From 640150c1b2c3cdbdd8baa5f1f3e7214a5c9a6533 Mon Sep 17 00:00:00 2001
From: Vincent Fu <vincent.fu@wdc.com>
Date: Tue, 31 Mar 2020 07:26:16 -0400
Subject: [PATCH] stat: eliminate extra log samples
b2a432bfbb6d inadvertently added extra log samples.
$ ./fio-canonical/fio --name=test --time_based --runtime=10s --write_lat_log=fio-07-b2a432 --log_avg_msec=1000 --size=1G --rw=rw
test: (g=0): rw=rw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
fio-3.17-93-gb2a4
Starting 1 process
...
$ cat fio-07-b2a432_clat.1.log
1000, 5851, 0, 0, 0
1000, 2551, 1, 0, 0
1000, 5028, 1, 0, 0
2000, 4175, 0, 0, 0
2000, 3214, 1, 0, 0
2000, 60619, 0, 0, 0
...
There should only be two lines at each timestamp (one for reads, one for
writes), but the first two timestamps have three lines each.
The cause is an inadvertent change in stat.c:add_log_sample() of
__add_stat_to_log to _add_stat_to_log. Reverting to the two-underscore
version resolves this issue.
Fixes: https://github.com/axboe/fio/issues/947
Fixes: b2a432bfbb6d ("Per-command priority: Priority logging and libaio/io_uring cmdprio_percentage")
Signed-off-by: Vincent Fu <vincent.fu@wdc.com>
---
stat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stat.c b/stat.c
index d8c01d14..efa811d2 100644
--- a/stat.c
+++ b/stat.c
@@ -2749,7 +2749,7 @@ static unsigned long add_log_sample(struct thread_data *td,
return diff;
}
- _add_stat_to_log(iolog, elapsed, td->o.log_max != 0, priority_bit);
+ __add_stat_to_log(iolog, ddir, elapsed, td->o.log_max != 0, priority_bit);
iolog->avg_last[ddir] = elapsed - (this_window - iolog->avg_msec);
return iolog->avg_msec;
--
2.17.1

View File

@ -1,61 +1,33 @@
Name: fio
Version: 3.27
Release: 8%{?dist}
Version: 3.19
Release: 4%{?dist}
Summary: Multithreaded IO generation tool
Group: Applications/System
License: GPLv2
URL: http://git.kernel.dk/?p=fio.git;a=summary
Source: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2
Patch0: 0001-ioengines-fix-crash-with-enghelp-option.patch
Patch1: 0001-fio-remove-raw-device-support.patch
Patch2: 0001-fio-use-LDFLAGS-when-linking-dynamic-engines.patch
Patch3: 0001-fio-os-detect-pmull-suooprt-on-arm.patch
Patch0: fio-eliminate-extra-log-samples.patch
Patch1: 0001-Unbreak-the-pmemblk-engine.patch
Patch2: 0001-init-fix-unit-of-latency_window.patch
Patch3: 0001-Add-option-latency_run-to-continue-enable-latency_ta.patch
Patch4: 0001-thread_options-Use-unsigned-int-type-for-exit_what-a.patch
Patch5: 0001-os-detect-PMULL-support-before-enabling-accelerated-.patch
BuildRequires: gcc
BuildRequires: libaio-devel
BuildRequires: zlib-devel
BuildRequires: python3-devel
BuildRequires: libnbd-devel
BuildRequires: libcurl-devel
BuildRequires: openssl-devel
%ifarch x86_64 ppc64le
BuildRequires: python3-devel
%ifarch x86_64
BuildRequires: libpmem-devel
BuildRequires: libpmemblk-devel
%endif
%ifnarch %{arm} %{ix86}
BuildRequires: librbd1-devel
%endif
%ifnarch %{arm}
BuildRequires: numactl-devel
BuildRequires: librdmacm-devel
%endif
BuildRequires: make
# Don't create automated dependencies for the fio engines.
# https://bugzilla.redhat.com/show_bug.cgi?id=1884954
%global __provides_exclude_from ^%{_libdir}/fio/
# Main fio package has soft dependencies on all the engine
# subpackages, but allows the engines to be uninstalled if not needed
# or if the dependencies are too onerous.
Recommends: %{name}-engine-libaio
Recommends: %{name}-engine-http
Recommends: %{name}-engine-nbd
%ifarch x86-64 ppc64le
Recommends: %{name}-engine-dev-dax
Recommends: %{name}-engine-pmemblk
Recommends: %{name}-engine-libpmem
%endif
%ifnarch %{arm} %{ix86}
Recommends: %{name}-engine-rados
Recommends: %{name}-engine-rbd
%endif
%ifnarch %{arm}
Recommends: %{name}-engine-rdma
%endif
%description
fio is an I/O tool that will spawn a number of threads or processes doing
@ -65,279 +37,66 @@ otherwise parameters given to them overriding that setting is given.
The typical use of fio is to write a job file matching the io load
one wants to simulate.
%package engine-libaio
Summary: Linux libaio engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-libaio
Linux libaio engine for %{name}.
%package engine-http
Summary: HTTP engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-http
HTTP engine for %{name}.
%package engine-nbd
Summary: Network Block Device engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-nbd
Network Block Device (NBD) engine for %{name}.
%ifarch x86_64 ppc64le
%package engine-dev-dax
Summary: PMDK dev-dax engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-dev-dax
dev-dax engine for %{name}.
Read and write using device DAX to a persistent memory device
(e.g., /dev/dax0.0) through the PMDK libpmem library.
%endif
%ifarch x86_64 ppc64le
%package engine-pmemblk
Summary: PMDK pmemblk engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-pmemblk
pmemblk engine for %{name}.
Read and write using filesystem DAX to a file on a filesystem mounted with
DAX on a persistent memory device through the PMDK libpmemblk library.
%endif
%ifarch x86_64 ppc64le
%package engine-libpmem
Summary: PMDK pmemblk engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-libpmem
libpmem engine for %{name}.
Read and write using mmap I/O to a file on a filesystem mounted with DAX
on a persistent memory device through the PMDK libpmem library.
%endif
%ifnarch %{arm} %{ix86}
%package engine-rados
Summary: Rados engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-rados
Rados engine for %{name}.
%package engine-rbd
Summary: Rados Block Device engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-rbd
Rados Block Device (RBD) engine for %{name}.
%endif
%ifnarch %{arm}
%package engine-rdma
Summary: RDMA engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-rdma
RDMA engine for %{name}.
%endif
%prep
%autosetup -p1
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
pathfix.py -i %{__python3} -pn \
doc/conf.py \
tools/fio_jsonplus_clat2csv \
tools/fiologparser.py \
tools/hist/*.py \
tools/plot/fio2gnuplot \
t/steadystate_tests.py
# Edit /usr/local/lib path in os/os-linux.h to match Fedora conventions.
sed -e 's,/usr/local/lib/,%{_libdir}/,g' -i os/os-linux.h
t/*.py
%build
./configure --disable-optimizations --enable-libnbd --dynamic-libengines
./configure --disable-optimizations
EXTFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" make V=1 %{?_smp_mflags}
%install
make install prefix=%{_prefix} mandir=%{_mandir} libdir=%{_libdir}/fio DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
make install prefix=%{_prefix} mandir=%{_mandir} DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
%files
%doc README REPORTING-BUGS HOWTO examples
%doc README REPORTING-BUGS COPYING HOWTO examples
%doc MORAL-LICENSE GFIO-TODO SERVER-TODO STEADYSTATE-TODO
%license COPYING
%dir %{_datadir}/%{name}
%dir %{_libdir}/fio/
%{_bindir}/*
%{_mandir}/man1/*
%{_datadir}/%{name}/*
%ifarch x86_64 ppc64le
%files engine-dev-dax
%{_libdir}/fio/fio-dev-dax.so
%endif
%files engine-http
%{_libdir}/fio/fio-http.so
%files engine-libaio
%{_libdir}/fio/fio-libaio.so
%ifarch x86_64 ppc64le
%files engine-libpmem
%{_libdir}/fio/fio-libpmem.so
%endif
%files engine-nbd
%{_libdir}/fio/fio-nbd.so
%ifarch x86_64 ppc64le
%files engine-pmemblk
%{_libdir}/fio/fio-pmemblk.so
%endif
%ifnarch %{arm} %{ix86}
%files engine-rados
%{_libdir}/fio/fio-rados.so
%files engine-rbd
%{_libdir}/fio/fio-rbd.so
%endif
%ifnarch %{arm}
%files engine-rdma
%{_libdir}/fio/fio-rdma.so
%endif
%changelog
* Mon Oct 24 2022 Pavel Reichl <preichl@redhat.com> - 3.27-8
- Fix fio failure with --verify=crc32c on arm
Related: rhbz#1974189
* Mon Oct 31 2022 Pavel Reichl <preichl@redhat.com> - 3.19-4
- crc32c_arm64(): fio killed by SIGILL
Fix rhbz#1954143
* Tue Feb 08 2022 Eric Sandeen <sandeen@redhat.com> - 3.27.7
- Use LDFLAGS when linking dynamic engines
Related: rhbz#2044858
* Thu Aug 20 2020 Eric Sandeen <sandeen@redhat.com> 3.19-3
- Fix regression in stonewall (#1869305)
* Tue Aug 10 2021 Eric Sandeen <sandeen@redhat.com> - 3.27.5
- Add gating CI yaml file
* Tue Jul 14 2020 Eric Sandeen <sandeen@redhat.com> 3.19-2
- Fix regression in pmemblk engine (#1846843)
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.27-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Apr 20 2020 Eric Sandeen <sandeen@redhat.com> 3.19-1
- Rebase to new upstream + bugfix
* Thu Aug 05 2021 Eric Sandeen <sandeen@redhat.com> - 3.27-3
- Fix crash on --enghelp option
- Fix FTBFS with new kernel headers (bz#1984823)
* Fri Jun 07 2019 Eric Sandeen <sandeen@redhat.com> 3.7-5
- Rebuild w/ tests in place (#1681954)
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.27-2
- Rebuilt for RHEL 9 BETA for openssl 3.0
Related: rhbz#1971065
* Wed Aug 01 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.7-3
- Fix python shebangs in a more portable way
* Thu May 27 2021 Eric Sandeen <sandeen@redhat.com> - 3.27-1
- New upstream version
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.25-4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Mon Feb 08 2021 Eric Sandeen <sandeen@redhat.com> 3.25-3
- Fix segfault with external IO engines and multiple threads
- Enable dev-dax, pmemblk, libpmem engines for ppc64le
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.25-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Dec 04 2020 Eric Sandeen <sandeen@redhat.com> 3.25-1
- New upstream version
* Thu Nov 12 2020 Eric Sandeen <sandeen@redhat.com> 3.24-1
- New upstream version
- Fix dynamic engine loading (#bz1894616)
* Mon Oct 05 2020 Richard W.M. Jones <rjones@redhat.com> 3.23-5
- Disable automatic provides for fio engines (RHBZ#1884954).
- Apply patch to change SONAME of fio engines (see comment 8 of above bug).
* Thu Oct 01 2020 Richard W.M. Jones <rjones@redhat.com> 3.23-3
- Add soft dependencies from main package to all the subpackages.
* Thu Oct 01 2020 Richard W.M. Jones <rjones@redhat.com> 3.23-2
- Enable dynamically loaded engines support.
- Move license to %%license section.
* Tue Sep 08 2020 Eric Sandeen <sandeen@redhat.com> 3.23-1
- New upstream version
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.21-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 20 2020 Eric Sandeen <sandeen@redhat.com> 3.21-1
- New upstream version
* Wed Jun 03 2020 Eric Sandeen <sandeen@redhat.com> 3.20-1
- New upstream version
* Fri May 15 2020 Martin Bukatovic <mbukatov@redhat.com> 3.19-3
- Enable http engine. (#1836323)
* Thu Apr 16 2020 Eric Sandeen <sandeen@redhat.com> 3.19-2
- Bugfix update: stat: eliminate extra log samples
* Thu Mar 12 2020 Eric Sandeen <sandeen@redhat.com> 3.19-1
- New upstream version
* Thu Feb 13 2020 Eric Sandeen <sandeen@redhat.com> 3.18-1
- New upstream version
- Fix gcc10 build
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Dec 16 2019 Eric Sandeen <sandeen@redhat.com> 3.17-1
- New upstream version
* Wed Nov 06 2019 Richard W.M. Jones <rjones@redhat.com> 3.16-2
- Enable Network Block Device (libnbd) engine.
* Sat Sep 21 2019 Eric Sandeen <sandeen@redhat.com> 3.16-1
- New upstream version
* Fri Aug 16 2019 Eric Sandeen <sandeen@redhat.com> 3.15-1
- New upstream version
* Thu Aug 08 2019 Eric Sandeen <sandeen@redhat.com> 3.14-3
- Make all scripts explicitly call python3 (#1738819)
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed May 22 2019 Eric Sandeen <sandeen@redhat.com> 3.14-1
- New upstream version
* Thu Feb 14 2019 Eric Sandeen <sandeen@redhat.com> 3.13-1
- New upstream version
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jan 17 2019 Eric Sandeen <sandeen@redhat.com> 3.12-1
- New upstream version
* Wed Aug 22 2018 Eric Sandeen <sandeen@redhat.com> 3.8-1
- New upstream version
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jun 25 2018 Eric Sandeen <sandeen@redhat.com> 3.7-2
- Re-add python3 shebang patch (#1561477)
* Fri Jun 01 2018 Eric Sandeen <sandeen@redhat.com> 3.7-1
- New upstream version
* Fri Jun 01 2018 Eric Sandeen <sandeen@redhat.com> 3.6-3
- Complete the conversion to python3
* Wed May 16 2018 Eric Sandeen <sandeen@redhat.com> 3.6-2
- Make all python scripts python3 compliant and explicit
- Make all python scripts python3 compliant and explicit (#1561477)
* Wed Apr 18 2018 Eric Sandeen <sandeen@redhat.com> 3.6-1
- New upstream version