Recent changes (master)
The following changes since commit 14691a4df98b85621b07dd2bdc0f0a960acbb8ba:
Merge branch 'gpspm-add-optional-use-rpma_conn_completion_wait-function' of https://github.com/ldorau/fio (2021-04-23 08:39:21 -0600)
are available in the Git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 13169d44d3725847858a7c817965d2cac5abd8f8:
Merge branch 'pthread_getaffinity_1' of https://github.com/kusumi/fio (2021-04-25 10:23:34 -0600)
----------------------------------------------------------------
Jens Axboe (1):
Merge branch 'pthread_getaffinity_1' of https://github.com/kusumi/fio
Tomohiro Kusumi (1):
gettime: Fix compilation on non-Linux with pthread_getaffinity_np()
gettime.c | 2 +- os/os-aix.h | 6 ++++++ os/os-android.h | 6 ++++++ os/os-dragonfly.h | 6 ++++++ os/os-freebsd.h | 6 ++++++ os/os-hpux.h | 7 +++++++ os/os-linux.h | 3 +++ os/os-mac.h | 6 ++++++ os/os-netbsd.h | 6 ++++++ os/os-openbsd.h | 6 ++++++ os/os-solaris.h | 6 ++++++ 11 files changed, 59 insertions(+), 1 deletion(-)
---
Diff of recent changes:
gettime.c +1 -1
@@ -679,7 +679,7 @@ int fio_monotonic_clocktest(int debug)unsigned int i;os_cpu_mask_t mask; -#ifdef CONFIG_PTHREAD_GETAFFINITY +#ifdef FIO_HAVE_GET_THREAD_AFFINITY fio_get_thread_affinity (mask);#else memset (&mask,0 ,sizeof (mask));
os/os-aix.h +6 -0
@@ -18,6 +18,12 @@#define FIO_USE_GENERIC_SWAP +#ifdef CONFIG_PTHREAD_GETAFFINITY +#define FIO_HAVE_GET_THREAD_AFFINITY +#define fio_get_thread_affinity (mask) \ + pthread_getaffinity_np(pthread_self(), sizeof(mask), &(mask)) +#endif +static inline int blockdev_invalidate_cache (struct fio_file *f) {return ENOTSUP ;
os/os-android.h +6 -0
@@ -58,6 +58,12 @@#define MAP_HUGETLB 0x40000/* arch specific */ #endif +#ifdef CONFIG_PTHREAD_GETAFFINITY +#define FIO_HAVE_GET_THREAD_AFFINITY +#define fio_get_thread_affinity (mask) \ + pthread_getaffinity_np(pthread_self(), sizeof(mask), &(mask)) +#endif +#ifndef CONFIG_NO_SHM /* * Bionic doesn't support SysV shared memeory, so implement it using ashmem
os/os-dragonfly.h +6 -0
@@ -92,6 +92,12 @@ typedef cpumask_t os_cpu_mask_t;/* No CPU_COUNT(), but use the default function defined in os/os.h */ #define fio_cpu_count (mask) CPU_COUNT((mask)) +#ifdef CONFIG_PTHREAD_GETAFFINITY +#define FIO_HAVE_GET_THREAD_AFFINITY +#define fio_get_thread_affinity (mask) \ + pthread_getaffinity_np(pthread_self(), sizeof(mask), &(mask)) +#endif +static inline int fio_cpuset_init (os_cpu_mask_t *mask) {CPUMASK_ASSZERO (*mask);
os/os-freebsd.h +6 -0
@@ -37,6 +37,12 @@ typedef cpuset_t os_cpu_mask_t;#define fio_cpu_isset (mask, cpu) (CPU_ISSET((cpu), (mask)) != 0)#define fio_cpu_count (mask) CPU_COUNT((mask)) +#ifdef CONFIG_PTHREAD_GETAFFINITY +#define FIO_HAVE_GET_THREAD_AFFINITY +#define fio_get_thread_affinity (mask) \ + pthread_getaffinity_np(pthread_self(), sizeof(mask), &(mask)) +#endif +static inline int fio_cpuset_init (os_cpu_mask_t *mask) {CPU_ZERO (mask);
os/os-hpux.h +7 -0
@@ -38,6 +38,13 @@#define FIO_USE_GENERIC_SWAP #define FIO_OS_HAVE_AIOCB_TYPEDEF + +#ifdef CONFIG_PTHREAD_GETAFFINITY +#define FIO_HAVE_GET_THREAD_AFFINITY +#define fio_get_thread_affinity (mask) \ + pthread_getaffinity_np(pthread_self(), sizeof(mask), &(mask)) +#endif +typedef struct aiocb64 os_aiocb_t ;static inline int blockdev_invalidate_cache (struct fio_file *f)
os/os-linux.h +3 -0
@@ -74,8 +74,11 @@ typedef cpu_set_t os_cpu_mask_t; sched_getaffinity((pid), (ptr))#endif +#ifdef CONFIG_PTHREAD_GETAFFINITY +#define FIO_HAVE_GET_THREAD_AFFINITY #define fio_get_thread_affinity (mask) \ pthread_getaffinity_np(pthread_self(), sizeof(mask), &(mask)) +#endif #define fio_cpu_clear (mask, cpu) (void) CPU_CLR((cpu), (mask))#define fio_cpu_set (mask, cpu) (void) CPU_SET((cpu), (mask))
os/os-mac.h +6 -0
@@ -27,6 +27,12 @@#define fio_swap32 (x) OSSwapInt32(x)#define fio_swap64 (x) OSSwapInt64(x) +#ifdef CONFIG_PTHREAD_GETAFFINITY +#define FIO_HAVE_GET_THREAD_AFFINITY +#define fio_get_thread_affinity (mask) \ + pthread_getaffinity_np(pthread_self(), sizeof(mask), &(mask)) +#endif +#ifndef CONFIG_CLOCKID_T typedef unsigned int clockid_t ;#endif
os/os-netbsd.h +6 -0
@@ -35,6 +35,12 @@#define fio_swap32 (x) bswap32(x)#define fio_swap64 (x) bswap64(x) +#ifdef CONFIG_PTHREAD_GETAFFINITY +#define FIO_HAVE_GET_THREAD_AFFINITY +#define fio_get_thread_affinity (mask) \ + pthread_getaffinity_np(pthread_self(), sizeof(mask), &(mask)) +#endif +static inline int blockdev_size (struct fio_file *f,unsigned long long *bytes) {struct disklabel dl;
os/os-openbsd.h +6 -0
@@ -35,6 +35,12 @@#define fio_swap32 (x) swap32(x)#define fio_swap64 (x) swap64(x) +#ifdef CONFIG_PTHREAD_GETAFFINITY +#define FIO_HAVE_GET_THREAD_AFFINITY +#define fio_get_thread_affinity (mask) \ + pthread_getaffinity_np(pthread_self(), sizeof(mask), &(mask)) +#endif +static inline int blockdev_size (struct fio_file *f,unsigned long long *bytes) {struct disklabel dl;
os/os-solaris.h +6 -0
@@ -46,6 +46,12 @@ struct solaris_rand_seed {#define os_ctime_r (x, y, z) ctime_r((x), (y), (z))#define FIO_OS_HAS_CTIME_R +#ifdef CONFIG_PTHREAD_GETAFFINITY +#define FIO_HAVE_GET_THREAD_AFFINITY +#define fio_get_thread_affinity (mask) \ + pthread_getaffinity_np(pthread_self(), sizeof(mask), &(mask)) +#endif +typedef psetid_t os_cpu_mask_t ;static inline int chardev_size (struct fio_file *f,unsigned long long *bytes)