Recent changes (master)
The following changes since commit e4d03925dca33524be25d883febf9d3b83155a9f:
plot: indicate that the pattern is a glob (2016-07-17 09:03:48 +0100)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to eec97b935abb714bf498c96a8f18ec1104c75fd4:
Add missing header inclusion for Android from 1c764dbe (2016-07-19 16:20:02 -0600)
----------------------------------------------------------------
Tomohiro Kusumi (8):
Fix wrong cpuio option name in documentation
Add CPU affinity support for DragonFlyBSD
Make I/O priority option generic for non-Linux environment [1/2] Make I/O priority option generic for non-Linux environment [2/2] Add ioprio_set() support for DragonFlyBSD
Change ARCH_X86_64_h to ARCH_X86_64_H
Add os/os-linux-syscall.h to separate syscall NR from arch headers Add missing header inclusion for Android from 1c764dbe
HOWTO | 5 +- arch/arch-aarch64.h | 5 - arch/arch-alpha.h | 15 --- arch/arch-arm.h | 22 ---- arch/arch-hppa.h | 15 --- arch/arch-ia64.h | 22 ---- arch/arch-mips.h | 15 --- arch/arch-ppc.h | 15 --- arch/arch-s390.h | 22 ---- arch/arch-sh.h | 15 --- arch/arch-sparc.h | 22 ---- arch/arch-sparc64.h | 22 ---- arch/arch-x86.h | 22 ---- arch/arch-x86_64.h | 34 +------ fio.1 | 2 +- options.c | 28 +++-- os/os-android.h | 8 ++ os/os-dragonfly.h | 138 ++++++++++++++++++++++++- os/os-linux-syscall.h | 277 ++++++++++++++++++++++++++++++++++++++++++++++++++ os/os-linux.h | 8 ++ 20 files changed, 452 insertions(+), 260 deletions(-) create mode 100644 os/os-linux-syscall.h
---
Diff of recent changes:
HOWTO +3 -2
@@ -749,7 +749,7 @@ ioengine=str Defines how the job issues io to the file. The following cpuio Doesn't transfer any data, but burns CPU cycles according to the cpuload= and - cpucycle= options. Setting cpuload=85 + cpuchunks= options. Setting cpuload=85 will cause that job to do nothing but burn 85% of the CPU. In case of SMP machines, use numjobs=<no_of_cpu> to get desired CPU
@@ -1064,7 +1064,8 @@ nice=int Run the job with the given nice value. See man nice(2). prio=int Set the io priority value of this job. Linux limits us to a positive value between 0 and 7, with 0 being the highest. - See man ionice(1). + See man ionice(1). Refer to an appropriate manpage for + other operating systems since meaning of priority may differ. prioclass=int Set the io priority class. See man ionice(1).
arch/arch-aarch64.h +0 -5
@@ -8,11 +8,6 @@#define FIO_ARCH (arch_aarch64) -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 30 -#define __NR_ioprio_get 31 -#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-alpha.h +0 -15
@@ -3,21 +3,6 @@#define FIO_ARCH (arch_alpha) -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 442 -#define __NR_ioprio_get 443 -#endif - -#ifndef __NR_fadvise64 -#define __NR_fadvise64 413 -#endif - -#ifndef __NR_sys_splice -#define __NR_sys_splice 468 -#define __NR_sys_tee 470 -#define __NR_sys_vmsplice 471 -#endif -#define nop do { } while (0)#define read_barrier () __asm__ __volatile__("mb": : :"memory")#define write_barrier () __asm__ __volatile__("wmb": : :"memory")
arch/arch-arm.h +0 -22
@@ -3,28 +3,6 @@#define FIO_ARCH (arch_arm) -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 314 -#define __NR_ioprio_get 315 -#endif - -#ifndef __NR_fadvise64 -#define __NR_fadvise64 270 -#endif - -#ifndef __NR_sys_splice -#define __NR_sys_splice 340 -#define __NR_sys_tee 342 -#define __NR_sys_vmsplice 343 -#endif - -#ifndef __NR_preadv2 -#define __NR_preadv2 392 -#endif -#ifndef __NR_pwritev2 -#define __NR_pwritev2 393 -#endif -#if defined (__ARM_ARCH_4__) || defined (__ARM_ARCH_4T__) \ || defined (__ARM_ARCH_5__) || defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5E__)\ || defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5TEJ__) \
arch/arch-hppa.h +0 -15
@@ -3,21 +3,6 @@#define FIO_ARCH (arch_hppa) -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 267 -#define __NR_ioprio_get 268 -#endif - -#ifndef __NR_fadvise64 -#define __NR_fadvise64 236 -#endif - -#ifndef __NR_sys_splice -#define __NR_sys_splice 291 -#define __NR_sys_tee 293 -#define __NR_sys_vmsplice 294 -#endif -#define nop do { } while (0)#define read_barrier () __asm__ __volatile__ ("" : : : "memory")
arch/arch-ia64.h +0 -22
@@ -3,28 +3,6 @@#define FIO_ARCH (arch_ia64) -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 1274 -#define __NR_ioprio_get 1275 -#endif - -#ifndef __NR_fadvise64 -#define __NR_fadvise64 1234 -#endif - -#ifndef __NR_sys_splice -#define __NR_sys_splice 1297 -#define __NR_sys_tee 1301 -#define __NR_sys_vmsplice 1302 -#endif - -#ifndef __NR_preadv2 -#define __NR_preadv2 1348 -#endif -#ifndef __NR_pwritev2 -#define __NR_pwritev2 1349 -#endif -#define nop asm volatile ("hint @pause" ::: "memory");#define read_barrier () asm volatile ("mf" ::: "memory")#define write_barrier () asm volatile ("mf" ::: "memory")
arch/arch-mips.h +0 -15
@@ -3,21 +3,6 @@#define FIO_ARCH (arch_mips) -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 314 -#define __NR_ioprio_get 315 -#endif - -#ifndef __NR_fadvise64 -#define __NR_fadvise64 215 -#endif - -#ifndef __NR_sys_splice -#define __NR_sys_splice 263 -#define __NR_sys_tee 265 -#define __NR_sys_vmsplice 266 -#endif -#define read_barrier () __asm__ __volatile__("": : :"memory")#define write_barrier () __asm__ __volatile__("": : :"memory")#define nop __asm__ __volatile__("": : :"memory")
arch/arch-ppc.h +0 -15
@@ -8,21 +8,6 @@#define FIO_ARCH (arch_ppc) -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 273 -#define __NR_ioprio_get 274 -#endif - -#ifndef __NR_fadvise64 -#define __NR_fadvise64 233 -#endif - -#ifndef __NR_sys_splice -#define __NR_sys_splice 283 -#define __NR_sys_tee 284 -#define __NR_sys_vmsplice 285 -#endif -#define nop do { } while (0)#ifdef __powerpc64__
arch/arch-s390.h +0 -22
@@ -3,28 +3,6 @@#define FIO_ARCH (arch_s390) -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 282 -#define __NR_ioprio_get 283 -#endif - -#ifndef __NR_fadvise64 -#define __NR_fadvise64 253 -#endif - -#ifndef __NR_sys_splice -#define __NR_sys_splice 306 -#define __NR_sys_tee 308 -#define __NR_sys_vmsplice 309 -#endif - -#ifndef __NR_preadv2 -#define __NR_preadv2 376 -#endif -#ifndef __NR_pwritev2 -#define __NR_pwritev2 377 -#endif -#define nop asm volatile("nop" : : : "memory")#define read_barrier () asm volatile("bcr 15,0" : : : "memory")#define write_barrier () asm volatile("bcr 15,0" : : : "memory")
arch/arch-sh.h +0 -15
@@ -5,21 +5,6 @@#define FIO_ARCH (arch_sh) -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 288 -#define __NR_ioprio_get 289 -#endif - -#ifndef __NR_fadvise64 -#define __NR_fadvise64 250 -#endif - -#ifndef __NR_sys_splice -#define __NR_sys_splice 313 -#define __NR_sys_tee 315 -#define __NR_sys_vmsplice 316 -#endif -#define nop __asm__ __volatile__ ("nop": : :"memory")#define mb () \
arch/arch-sparc.h +0 -22
@@ -3,28 +3,6 @@#define FIO_ARCH (arch_sparc) -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 196 -#define __NR_ioprio_get 218 -#endif - -#ifndef __NR_fadvise64 -#define __NR_fadvise64 209 -#endif - -#ifndef __NR_sys_splice -#define __NR_sys_splice 232 -#define __NR_sys_tee 280 -#define __NR_sys_vmsplice 25 -#endif - -#ifndef __NR_preadv2 -#define __NR_preadv2 358 -#endif -#ifndef __NR_pwritev2 -#define __NR_pwritev2 359 -#endif -#define nop do { } while (0)#define read_barrier () __asm__ __volatile__ ("" : : : "memory")
arch/arch-sparc64.h +0 -22
@@ -3,28 +3,6 @@#define FIO_ARCH (arch_sparc64) -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 196 -#define __NR_ioprio_get 218 -#endif - -#ifndef __NR_fadvise64 -#define __NR_fadvise64 209 -#endif - -#ifndef __NR_sys_splice -#define __NR_sys_splice 232 -#define __NR_sys_tee 280 -#define __NR_sys_vmsplice 25 -#endif - -#ifndef __NR_preadv2 -#define __NR_preadv2 358 -#endif -#ifndef __NR_pwritev2 -#define __NR_pwritev2 359 -#endif -#define nop do { } while (0)#define membar_safe (type) \
arch/arch-x86.h +0 -22
@@ -14,28 +14,6 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx,#define FIO_ARCH (arch_i386) -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 289 -#define __NR_ioprio_get 290 -#endif - -#ifndef __NR_fadvise64 -#define __NR_fadvise64 250 -#endif - -#ifndef __NR_sys_splice -#define __NR_sys_splice 313 -#define __NR_sys_tee 315 -#define __NR_sys_vmsplice 316 -#endif - -#ifndef __NR_preadv2 -#define __NR_preadv2 378 -#endif -#ifndef __NR_pwritev2 -#define __NR_pwritev2 379 -#endif -#define FIO_HUGE_PAGE 4194304#define nop __asm__ __volatile__("rep;nop": : :"memory")
arch/arch-x86_64.h +2 -32
@@ -1,5 +1,5 @@ -#ifndef ARCH_X86_64_h -#define ARCH_X86_64_h +#ifndef ARCH_X86_64_H +#define ARCH_X86_64_H static inline void do_cpuid (unsigned int *eax,unsigned int *ebx,unsigned int *ecx,unsigned int *edx)
@@ -14,36 +14,6 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx,#define FIO_ARCH (arch_x86_64) -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 251 -#define __NR_ioprio_get 252 -#endif - -#ifndef __NR_fadvise64 -#define __NR_fadvise64 221 -#endif - -#ifndef __NR_sys_splice -#define __NR_sys_splice 275 -#define __NR_sys_tee 276 -#define __NR_sys_vmsplice 278 -#endif - -#ifndef __NR_shmget -#define __NR_shmget 29 -#define __NR_shmat 30 -#define __NR_shmctl 31 -#define __NR_shmdt 67 -#endif - -#ifndef __NR_preadv2 -#define __NR_preadv2 327 -#endif -#ifndef __NR_pwritev2 -#define __NR_pwritev2 328 -#endif - -#define FIO_HUGE_PAGE 2097152#define nop __asm__ __volatile__("rep;nop": : :"memory")
fio.1 +1 -1
@@ -654,7 +654,7 @@ and send/receive. This ioengine defines engine specific options. .TP .B cpuio Doesn't transfer any data, but burns CPU cycles according to \fBcpuload\fR and -\fBcpucycles\fR parameters. +\fBcpuchunks\fR parameters. .TP .B guasi The GUASI I/O engine is the Generic Userspace Asynchronous Syscall Interface
options.c +17 -11
@@ -3012,36 +3012,42 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .type = FIO_OPT_INT, .off1 = td_var_offset(ioprio), .help = "Set job IO priority value", - .minval = 0, - .maxval = 7, + .minval = IOPRIO_MIN_PRIO, + .maxval = IOPRIO_MAX_PRIO, .interval = 1, .category = FIO_OPT_C_GENERAL, .group = FIO_OPT_G_CRED, }, +#else + { + .name = "prio", + .lname = "I/O nice priority", + .type = FIO_OPT_UNSUPPORTED, + .help = "Your platform does not support IO priorities", + }, +#endif +#ifdef FIO_HAVE_IOPRIO_CLASS +#ifndef FIO_HAVE_IOPRIO +#error "FIO_HAVE_IOPRIO_CLASS requires FIO_HAVE_IOPRIO" +#endif { .name = "prioclass", .lname = "I/O nice priority class", .type = FIO_OPT_INT, .off1 = td_var_offset(ioprio_class), .help = "Set job IO priority class", - .minval = 0, - .maxval = 3, + .minval = IOPRIO_MIN_PRIO_CLASS, + .maxval = IOPRIO_MAX_PRIO_CLASS, .interval = 1, .category = FIO_OPT_C_GENERAL, .group = FIO_OPT_G_CRED, }, #else { - .name = "prio", - .lname = "I/O nice priority", - .type = FIO_OPT_UNSUPPORTED, - .help = "Your platform does not support IO priorities", - }, - { .name = "prioclass", .lname = "I/O nice priority class", .type = FIO_OPT_UNSUPPORTED, - .help = "Your platform does not support IO priorities", + .help = "Your platform does not support IO priority classes", }, #endif {
os/os-android.h +8 -0
@@ -16,12 +16,14 @@#include <linux/major.h> #include <asm/byteorder.h> +#include "./os-linux-syscall.h" #include "binject.h" #include "../file.h" #define FIO_HAVE_DISK_UTIL #define FIO_HAVE_IOSCHED_SWITCH #define FIO_HAVE_IOPRIO +#define FIO_HAVE_IOPRIO_CLASS #define FIO_HAVE_ODIRECT #define FIO_HAVE_HUGETLB #define FIO_HAVE_BLKTRACE
@@ -140,6 +142,12 @@ enum {#define IOPRIO_BITS 16#define IOPRIO_CLASS_SHIFT 13 +#define IOPRIO_MIN_PRIO 0/* highest priority */ +#define IOPRIO_MAX_PRIO 7/* lowest priority */ + +#define IOPRIO_MIN_PRIO_CLASS 0 +#define IOPRIO_MAX_PRIO_CLASS 3 +static inline int ioprio_set (int which,int who,int ioprio_class,int ioprio) {/*
os/os-dragonfly.h +136 -2
157 lines not on this page · raw message
os/os-linux-syscall.h new file +277 -0
277 lines not on this page · raw message
os/os-linux.h +8 -0
@@ -18,6 +18,7 @@#include <linux/major.h> #include <byteswap.h> +#include "./os-linux-syscall.h" #include "binject.h" #include "../file.h"
@@ -25,6 +26,7 @@#define FIO_HAVE_DISK_UTIL #define FIO_HAVE_SGIO #define FIO_HAVE_IOPRIO +#define FIO_HAVE_IOPRIO_CLASS #define FIO_HAVE_IOSCHED_SWITCH #define FIO_HAVE_ODIRECT #define FIO_HAVE_HUGETLB
@@ -96,6 +98,12 @@ enum {#define IOPRIO_BITS 16#define IOPRIO_CLASS_SHIFT 13 +#define IOPRIO_MIN_PRIO 0/* highest priority */ +#define IOPRIO_MAX_PRIO 7/* lowest priority */ + +#define IOPRIO_MIN_PRIO_CLASS 0 +#define IOPRIO_MAX_PRIO_CLASS 3 +static inline int ioprio_set (int which,int who,int ioprio_class,int ioprio) {/*