Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Feb 7, 2020

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit ac694f66968fe7b18c820468abd8333f3df333fb:

Fio 3.18 (2020-02-05 07:59:58 -0700)

are available in the Git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to 1b5e13beb3acc2a08321ce687727e2cbbb3b954f:

Merge branch 'master' of https://github.com/vincentkfu/fio (2020-02-06 12:17:25 -0700)

----------------------------------------------------------------
Bart Van Assche (1):
Make the JSON code easier to analyze

Jens Axboe (3):
Unify architecture io_uring syscall numbers Merge branch 'master' of https://github.com/bvanassche/fio
Merge branch 'master' of https://github.com/vincentkfu/fio

Vincent Fu (4):
stat: summary statistics for both high/low priority latencies .gitignore: add some test programs
gfio: add high/low priority latency results t/run-fio-tests: fix style issues

 .gitignore             |   3 +
 arch/arch-aarch64.h    |  12 --
 arch/arch-ppc.h        |  12 --
 arch/arch-x86-common.h |  11 -
 arch/arch.h            |  28 +++
 engines/io_uring.c     |   8 +-
 gclient.c              |  55 ++++-
 json.c                 |  68 +++---
 json.h                 | 140 ++++++++++--
 stat.c                 |  10 +-
 t/io_uring.c           |  10 +-
 t/run-fio-tests.py     | 575 ++++++++++++++++++++++++++-----------------------
 12 files changed, 564 insertions(+), 368 deletions(-)

---

Diff of recent changes:

.gitignore +3 -0
index b228938d..b84b0fda 100644
@@ -16,7 +16,10 @@
 /t/fio-verify-state
 /t/gen-rand
 /t/ieee754
+t/io_uring
 /t/lfsr-test
+t/memlock
+t/read-to-pipe-async
 /t/stest
 /unittests/unittest
 y.tab.*
arch/arch-aarch64.h +0 -12
index de9b349b..2a86cc5a 100644
@@ -8,18 +8,6 @@
 
 #define FIO_ARCH	(arch_aarch64)
 
-#define ARCH_HAVE_IOURING
-
-#ifndef __NR_sys_io_uring_setup
-#define __NR_sys_io_uring_setup		425
-#endif
-#ifndef __NR_sys_io_uring_enter
-#define __NR_sys_io_uring_enter		426
-#endif
-#ifndef __NR_sys_io_uring_register
-#define __NR_sys_io_uring_register	427
-#endif
-
 #define nop		do { __asm__ __volatile__ ("yield"); } while (0)
 #define read_barrier()	do { __sync_synchronize(); } while (0)
 #define write_barrier()	do { __sync_synchronize(); } while (0)
arch/arch-ppc.h +0 -12
index 46246bae..804d596a 100644
@@ -24,18 +24,6 @@
 #define PPC_CNTLZL "cntlzw"
 #endif
 
-#define ARCH_HAVE_IOURING
-
-#ifndef __NR_sys_io_uring_setup
-#define __NR_sys_io_uring_setup		425
-#endif
-#ifndef __NR_sys_io_uring_enter
-#define __NR_sys_io_uring_enter		426
-#endif
-#ifndef __NR_sys_io_uring_register
-#define __NR_sys_io_uring_register	427
-#endif
-
 static inline int __ilog2(unsigned long bitmask)
 {
 	int lz;
arch/arch-x86-common.h +0 -11
index 87925bdc..f32835cc 100644
@@ -3,16 +3,6 @@
 
 #include <string.h>
 
-#ifndef __NR_sys_io_uring_setup
-#define __NR_sys_io_uring_setup		425
-#endif
-#ifndef __NR_sys_io_uring_enter
-#define __NR_sys_io_uring_enter		426
-#endif
-#ifndef __NR_sys_io_uring_register
-#define __NR_sys_io_uring_register	427
-#endif
-
 static inline void cpuid(unsigned int op,
 			 unsigned int *eax, unsigned int *ebx,
 			 unsigned int *ecx, unsigned int *edx)
@@ -23,7 +13,6 @@ static inline void cpuid(unsigned int op,
 }
 
 #define ARCH_HAVE_INIT
-#define ARCH_HAVE_IOURING
 
 extern bool tsc_reliable;
 extern int arch_random;
arch/arch.h +28 -0
index 0ec3f10f..30c0d205 100644
@@ -76,4 +76,32 @@ static inline int arch_init(char *envp[])
 }
 #endif
 
+#ifdef __alpha__
+/*
+ * alpha is the only exception, all other architectures
+ * have common numbers for new system calls.
+ */
+# ifndef __NR_io_uring_setup
+#  define __NR_io_uring_setup		535
+# endif
+# ifndef __NR_io_uring_enter
+#  define __NR_io_uring_enter		536
+# endif
+# ifndef __NR_io_uring_register
+#  define __NR_io_uring_register	537
+# endif
+#else /* !__alpha__ */
+# ifndef __NR_io_uring_setup
+#  define __NR_io_uring_setup		425
+# endif
+# ifndef __NR_io_uring_enter
+#  define __NR_io_uring_enter		426
+# endif
+# ifndef __NR_io_uring_register
+#  define __NR_io_uring_register	427
+# endif
+#endif
+
+#define ARCH_HAVE_IOURING
+
 #endif
engines/io_uring.c +4 -4
index f1ffc712..5e59f975 100644
@@ -191,7 +191,7 @@ static struct fio_option options[] = {
 static int io_uring_enter(struct ioring_data *ld, unsigned int to_submit,
 			 unsigned int min_complete, unsigned int flags)
 {
-	return syscall(__NR_sys_io_uring_enter, ld->ring_fd, to_submit,
+	return syscall(__NR_io_uring_enter, ld->ring_fd, to_submit,
 			min_complete, flags, NULL, 0);
 }
 
@@ -548,7 +548,7 @@ static int fio_ioring_queue_init(struct thread_data *td)
 		}
 	}
 
-	ret = syscall(__NR_sys_io_uring_setup, depth, &p);
+	ret = syscall(__NR_io_uring_setup, depth, &p);
 	if (ret < 0)
 		return ret;
 
@@ -563,7 +563,7 @@ static int fio_ioring_queue_init(struct thread_data *td)
 		if (setrlimit(RLIMIT_MEMLOCK, &rlim) < 0)
 			return -1;
 
-		ret = syscall(__NR_sys_io_uring_register, ld->ring_fd,
+		ret = syscall(__NR_io_uring_register, ld->ring_fd,
 				IORING_REGISTER_BUFFERS, ld->iovecs, depth);
 		if (ret < 0)
 			return ret;
@@ -589,7 +589,7 @@ static int fio_ioring_register_files(struct thread_data *td)
 		f->engine_pos = i;
 	}
 
-	ret = syscall(__NR_sys_io_uring_register, ld->ring_fd,
+	ret = syscall(__NR_io_uring_register, ld->ring_fd,
 			IORING_REGISTER_FILES, ld->fds, td->o.nr_files);
 	if (ret) {
 err:
gclient.c +51 -4

103 lines not on this page · raw message

json.c +40 -28

89 lines not on this page · raw message

json.h +118 -22

146 lines not on this page · raw message

stat.c +7 -3
index 69d57b69..d8c01d14 100644
@@ -482,9 +482,13 @@ static void show_ddir_status(struct group_run_stats *rs, struct thread_stat *ts,
 		display_lat("clat", min, max, mean, dev, out);
 	if (calc_lat(&ts->lat_stat[ddir], &min, &max, &mean, &dev))
 		display_lat(" lat", min, max, mean, dev, out);
-	if (calc_lat(&ts->clat_high_prio_stat[ddir], &min, &max, &mean, &dev))
-		display_lat(ts->lat_percentiles ? "prio_lat" : "prio_clat",
+	if (calc_lat(&ts->clat_high_prio_stat[ddir], &min, &max, &mean, &dev)) {
+		display_lat(ts->lat_percentiles ? "high prio_lat" : "high prio_clat",
 				min, max, mean, dev, out);
+		if (calc_lat(&ts->clat_low_prio_stat[ddir], &min, &max, &mean, &dev))
+			display_lat(ts->lat_percentiles ? "low prio_lat" : "low prio_clat",
+					min, max, mean, dev, out);
+	}
 
 	if (ts->slat_percentiles && ts->slat_stat[ddir].samples > 0)
 		show_clat_percentiles(ts->io_u_plat[FIO_SLAT][ddir],
@@ -950,7 +954,7 @@ void json_array_add_disk_util(struct disk_util_stat *dus,
 	obj = json_create_object();
 	json_array_add_value_object(array, obj);
 
-	json_object_add_value_string(obj, "name", dus->name);
+	json_object_add_value_string(obj, "name", (const char *)dus->name);
 	json_object_add_value_int(obj, "read_ios", dus->s.ios[0]);
 	json_object_add_value_int(obj, "write_ios", dus->s.ios[1]);
 	json_object_add_value_int(obj, "read_merges", dus->s.merges[0]);
t/io_uring.c +5 -5
index c2e5e098..55b75f6e 100644
@@ -100,7 +100,7 @@ static int io_uring_register_buffers(struct submitter *s)
 	if (do_nop)
 		return 0;
 
-	return syscall(__NR_sys_io_uring_register, s->ring_fd,
+	return syscall(__NR_io_uring_register, s->ring_fd,
 			IORING_REGISTER_BUFFERS, s->iovecs, depth);
 }
 
@@ -117,20 +117,20 @@ static int io_uring_register_files(struct submitter *s)
 		s->files[i].fixed_fd = i;
 	}
 
-	return syscall(__NR_sys_io_uring_register, s->ring_fd,
+	return syscall(__NR_io_uring_register, s->ring_fd,
 			IORING_REGISTER_FILES, s->fds, s->nr_files);
 }
 
 static int io_uring_setup(unsigned entries, struct io_uring_params *p)
 {
-	return syscall(__NR_sys_io_uring_setup, entries, p);
+	return syscall(__NR_io_uring_setup, entries, p);
 }
 
 static int io_uring_enter(struct submitter *s, unsigned int to_submit,
 			  unsigned int min_complete, unsigned int flags)
 {
-	return syscall(__NR_sys_io_uring_enter, s->ring_fd, to_submit,
-			min_complete, flags, NULL, 0);
+	return syscall(__NR_io_uring_enter, s->ring_fd, to_submit, min_complete,
+			flags, NULL, 0);
 }
 
 #ifndef CONFIG_HAVE_GETTID
t/run-fio-tests.py +308 -267

753 lines not on this page · raw message