The following changes since commit 20d61dff3c371c6cbf18ec5373e9c5f56c28732a: AIX fixups (2010-08-10 20:20:22 -0400) are available in the git repository at: git://git.kernel.dk/fio.git master Jens Axboe (4): Bad indentation Cleanup MSG_DONTWAIT Update OS support line Add comment on why fallocate is disabled on AIX README | 8 ++++---- arch/arch-ppc.h | 18 +++++++++--------- engines/net.c | 18 ++++-------------- os/os-aix.h | 8 ++++++++ os/os.h | 4 ++++ 5 files changed, 29 insertions(+), 27 deletions(-) --- Diff of recent changes: diff --git a/README b/README index 4115455..f67a02b 100644 --- a/README +++ b/README @@ -274,10 +274,10 @@ The job file parameters are: Platforms --------- -Fio works on (at least) Linux, Solaris, AIX and FreeBSD. Some features and/or -options may only be available on some of the platforms, typically because -those features only apply to that platform (like the solarisaio engine, or -the splice engine on Linux). +Fio works on (at least) Linux, Solaris, AIX, OSX, NetBSD, and FreeBSD. Some +features and/or options may only be available on some of the platforms, +typically because those features only apply to that platform (like the +solarisaio engine, or the splice engine on Linux). Some features are not available on FreeBSD/Solaris even if they could be implemented, I'd be happy to take patches for that. An example of that is diff --git a/arch/arch-ppc.h b/arch/arch-ppc.h index 8719869..d495a1b 100644 --- a/arch/arch-ppc.h +++ b/arch/arch-ppc.h @@ -45,17 +45,17 @@ static inline int arch_ffz(unsigned long bitmask) static inline unsigned long long get_cpu_clock(void) { - unsigned int tbl, tbu0, tbu1; - unsigned long long ret; + unsigned int tbl, tbu0, tbu1; + unsigned long long ret; - do { - __asm__ __volatile__ ("mftbu %0" : "=r"(tbu0)); - __asm__ __volatile__ ("mftb %0" : "=r"(tbl) ); - __asm__ __volatile__ ("mftbu %0" : "=r"(tbu1)); - } while (tbu0 != tbu1); + do { + __asm__ __volatile__ ("mftbu %0" : "=r"(tbu0)); + __asm__ __volatile__ ("mftb %0" : "=r"(tbl) ); + __asm__ __volatile__ ("mftbu %0" : "=r"(tbu1)); + } while (tbu0 != tbu1); - ret = (((unsigned long long)tbu0) << 32) | tbl; - return ret; + ret = (((unsigned long long)tbu0) << 32) | tbl; + return ret; } #define ARCH_HAVE_FFZ diff --git a/engines/net.c b/engines/net.c index 9e6e789..0566a61 100644 --- a/engines/net.c +++ b/engines/net.c @@ -223,10 +223,7 @@ static int fio_netio_splice_out(struct thread_data *td, struct io_u *io_u) static int fio_netio_send(struct thread_data *td, struct io_u *io_u) { struct netio_data *nd = td->io_ops->data; - int ret, flags = 0; -#ifdef MSG_DONTWAIT - flags = MSG_DONTWAIT; -#endif + int ret, flags = OS_MSG_DONTWAIT; do { if (nd->net_protocol == IPPROTO_UDP) { @@ -254,9 +251,7 @@ static int fio_netio_send(struct thread_data *td, struct io_u *io_u) if (ret <= 0) break; -#ifdef MSG_DONTWAIT - flags &= ~MSG_DONTWAIT; -#endif + flags &= ~OS_MSG_DONTWAIT; } while (1); return ret; @@ -281,10 +276,7 @@ static int is_udp_close(struct io_u *io_u, int len) static int fio_netio_recv(struct thread_data *td, struct io_u *io_u) { struct netio_data *nd = td->io_ops->data; - int ret, flags = 0; -#ifdef MSG_DONTWAIT - flags = MSG_DONTWAIT; -#endif + int ret, flags = OS_MSG_DONTWAIT; do { if (nd->net_protocol == IPPROTO_UDP) { @@ -307,9 +299,7 @@ static int fio_netio_recv(struct thread_data *td, struct io_u *io_u) ret = poll_wait(td, io_u->file->fd, POLLIN); if (ret <= 0) break; -#ifdef MSG_DONTWAIT - flags &= ~MSG_DONTWAIT; -#endif + flags &= ~OS_MSG_DONTWAIT; flags |= MSG_WAITALL; } while (1); diff --git a/os/os-aix.h b/os/os-aix.h index 7a64697..09a0530 100644 --- a/os/os-aix.h +++ b/os/os-aix.h @@ -10,9 +10,17 @@ #define FIO_HAVE_ODIRECT #define FIO_USE_GENERIC_RAND +/* + * This is broken on AIX if _LARGE_FILES is defined... + */ +#if 0 +#define FIO_HAVE_FALLOCATE +#endif + #define FIO_HAVE_PSHARED_MUTEX #define OS_MAP_ANON MAP_ANON +#define OS_MSG_DONTWAIT 0 static inline int blockdev_invalidate_cache(int fd) { diff --git a/os/os.h b/os/os.h index e2bb0ba..c8f517b 100644 --- a/os/os.h +++ b/os/os.h @@ -37,6 +37,10 @@ #include "../lib/strsep.h" #endif +#ifdef MSG_DONTWAIT +#define OS_MSG_DONTWAIT MSG_DONTWAIT +#endif + #ifndef FIO_HAVE_FADVISE #define fadvise(fd, off, len, advice) (0) -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html