Recent changes (master)
The following changes since commit 5857e8e0f53e81bd7096209fe5cabf91ce74b853:
Merge branch 'patch-1' of https://github.com/joaomlneto/fio (2018-10-05 19:11:19 -0600)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to ee6ce26c029dbdb62184d2f011fdab61d3429d82:
options: kill 'use_os_rand' (2018-10-08 13:43:23 -0600)
----------------------------------------------------------------
Jens Axboe (2):
Remove old OS dependent (unused) random code
options: kill 'use_os_rand'
options.c | 8 -------- os/os-aix.h | 1 - os/os-android.h | 17 ----------------- os/os-dragonfly.h | 1 - os/os-freebsd.h | 1 - os/os-hpux.h | 1 - os/os-linux.h | 15 --------------- os/os-mac.h | 1 - os/os-netbsd.h | 1 - os/os-openbsd.h | 1 - os/os-solaris.h | 16 ---------------- os/os-windows.h | 1 - os/os.h | 17 ----------------- thread_options.h | 6 ++---- 14 files changed, 2 insertions(+), 85 deletions(-)
---
Diff of recent changes:
options.c +0 -8
@@ -2203,14 +2203,6 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .group = FIO_OPT_G_RANDOM, }, { - .name = "use_os_rand", - .lname = "Use OS random", - .type = FIO_OPT_DEPRECATED, - .off1 = offsetof(struct thread_options, dep_use_os_rand), - .category = FIO_OPT_C_IO, - .group = FIO_OPT_G_RANDOM, - }, - { .name = "norandommap", .lname = "No randommap", .type = FIO_OPT_STR_SET,
os/os-aix.h +0 -1
@@ -11,7 +11,6 @@#include "../file.h" #define FIO_HAVE_ODIRECT -#define FIO_USE_GENERIC_RAND #define FIO_USE_GENERIC_INIT_RANDOM_STATE #define OS_MAP_ANON MAP_ANON
os/os-android.h +0 -17
@@ -201,23 +201,6 @@ static inline unsigned long long os_phys_mem(void)return (unsigned long long ) pages * (unsigned long long ) pagesize; } -typedef struct {unsigned short r[3 ]; }os_random_state_t ; - -static inline void os_random_seed (unsigned long seed,os_random_state_t *rs) -{ - rs->r[0 ] = seed &0xffff ; - seed >>=16 ; - rs->r[1 ] = seed &0xffff ; - seed >>=16 ; - rs->r[2 ] = seed &0xffff ; -seed48 (rs->r); -} - -static inline long os_random_long (os_random_state_t *rs) -{ -return nrand48 (rs->r); -} -#ifdef O_NOATIME #define FIO_O_NOATIME O_NOATIME#else
os/os-dragonfly.h +0 -1
@@ -25,7 +25,6 @@#include "../lib/types.h" #define FIO_HAVE_ODIRECT -#define FIO_USE_GENERIC_RAND #define FIO_USE_GENERIC_INIT_RANDOM_STATE #define FIO_HAVE_FS_STAT #define FIO_HAVE_TRIM
os/os-freebsd.h +0 -1
@@ -16,7 +16,6 @@#include "../file.h" #define FIO_HAVE_ODIRECT -#define FIO_USE_GENERIC_RAND #define FIO_USE_GENERIC_INIT_RANDOM_STATE #define FIO_HAVE_CHARDEV_SIZE #define FIO_HAVE_FS_STAT
os/os-hpux.h +0 -1
@@ -20,7 +20,6 @@#include "../file.h" #define FIO_HAVE_ODIRECT -#define FIO_USE_GENERIC_RAND #define FIO_USE_GENERIC_INIT_RANDOM_STATE #define FIO_HAVE_CHARDEV_SIZE
os/os-linux.h +0 -15
@@ -60,8 +60,6 @@typedef cpu_set_t os_cpu_mask_t ; -typedef struct drand48_data os_random_state_t ; -#ifdef CONFIG_3ARG_AFFINITY #define fio_setaffinity (pid, cpumask) \ sched_setaffinity((pid), sizeof(cpumask), &(cpumask))
@@ -170,19 +168,6 @@ static inline unsigned long long os_phys_mem(void)return (unsigned long long ) pages * (unsigned long long ) pagesize; } -static inline void os_random_seed (unsigned long seed,os_random_state_t *rs) -{ -srand48_r (seed, rs); -} - -static inline long os_random_long (os_random_state_t *rs) -{ -long val; - -lrand48_r (rs, &val); -return val; -} -static inline int fio_lookup_raw (dev_t dev,int *majdev,int *mindev) {struct raw_config_request rq;
os/os-mac.h +0 -1
@@ -16,7 +16,6 @@#include "../file.h" -#define FIO_USE_GENERIC_RAND #define FIO_USE_GENERIC_INIT_RANDOM_STATE #define FIO_HAVE_GETTID #define FIO_HAVE_CHARDEV_SIZE
os/os-netbsd.h +0 -1
@@ -21,7 +21,6 @@#include "../file.h" #define FIO_HAVE_ODIRECT -#define FIO_USE_GENERIC_RAND #define FIO_USE_GENERIC_INIT_RANDOM_STATE #define FIO_HAVE_FS_STAT #define FIO_HAVE_GETTID
os/os-openbsd.h +0 -1
@@ -20,7 +20,6 @@#include "../file.h" -#define FIO_USE_GENERIC_RAND #define FIO_USE_GENERIC_INIT_RANDOM_STATE #define FIO_HAVE_FS_STAT #define FIO_HAVE_GETTID
os/os-solaris.h +0 -16
@@ -47,7 +47,6 @@ struct solaris_rand_seed {#define FIO_OS_HAS_CTIME_R typedef psetid_t os_cpu_mask_t ; -typedef struct solaris_rand_seed os_random_state_t ;static inline int chardev_size (struct fio_file *f,unsigned long long *bytes) {
@@ -92,21 +91,6 @@ static inline unsigned long long get_fs_free_size(const char *path)return ret; } -static inline void os_random_seed (unsigned long seed,os_random_state_t *rs) -{ - rs->r[0 ] = seed &0xffff ; - seed >>=16 ; - rs->r[1 ] = seed &0xffff ; - seed >>=16 ; - rs->r[2 ] = seed &0xffff ; -seed48 (rs->r); -} - -static inline long os_random_long (os_random_state_t *rs) -{ -return nrand48 (rs->r); -} -#define FIO_OS_DIRECTIO extern int directio (int ,int );static inline int fio_set_odirect (struct fio_file *f)
os/os-windows.h +0 -1
@@ -35,7 +35,6 @@ int rand_r(unsigned *);#define FIO_HAVE_CPU_AFFINITY #define FIO_HAVE_CHARDEV_SIZE #define FIO_HAVE_GETTID -#define FIO_USE_GENERIC_RAND #define FIO_PREFERRED_ENGINE "windowsaio"#define FIO_PREFERRED_CLOCK_SOURCE CS_CGETTIME
os/os.h +0 -17
@@ -298,23 +298,6 @@ static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes) }#endif -#ifdef FIO_USE_GENERIC_RAND -typedef unsigned int os_random_state_t ; - -static inline void os_random_seed (unsigned long seed,os_random_state_t *rs) -{ -srand (seed); -} - -static inline long os_random_long (os_random_state_t *rs) -{ -long val; - - val =rand_r (rs); -return val; -} -#endif -#ifdef FIO_USE_GENERIC_INIT_RANDOM_STATE static inline int init_random_seeds (unsigned long *rand_seeds,int size) {
thread_options.h +2 -4
@@ -140,7 +140,6 @@ struct thread_options {unsigned int rand_repeatable;unsigned int allrand_repeatable;unsigned long long rand_seed; -unsigned int dep_use_os_rand;unsigned int log_avg_msec;unsigned int log_hist_msec;unsigned int log_hist_coarseness;
@@ -173,7 +172,6 @@ struct thread_options {unsigned int hugepage_size;unsigned long long rw_min_bs; -unsigned int pad2;unsigned int thinktime;unsigned int thinktime_spin;unsigned int thinktime_blocks;
@@ -430,8 +428,8 @@ struct thread_options_pack {uint32_t override_sync;uint32_t rand_repeatable;uint32_t allrand_repeatable; +uint32_t pad;uint64_t rand_seed; -uint32_t dep_use_os_rand;uint32_t log_avg_msec;uint32_t log_hist_msec;uint32_t log_hist_coarseness;
@@ -572,7 +570,7 @@ struct thread_options_pack {uint32_t rate_iops_min[DDIR_RWDIR_CNT ];uint32_t rate_process;uint32_t rate_ign_think; -uint32_t pad; +uint32_t pad3;uint8_t ioscheduler[FIO_TOP_STR_MAX ];