X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=fio.c;h=a408727399d388dc4ba5f993163cf13552eb0f80;hb=7732a09b0a5331f20b7fdf42f811a3f2805dcaae;hp=f0a8ee2636d015116055d69148a0f524dfc50f40;hpb=2e1df07d1ea30e0304cc65370f3ed161a6f22cd4;p=fio.git diff --git a/fio.c b/fio.c index f0a8ee26..a4087273 100644 --- a/fio.c +++ b/fio.c @@ -22,19 +22,8 @@ * */ #include -#include -#include -#include -#include -#include #include -#include #include -#include -#include -#include -#include -#include #include "fio.h" #include "hash.h" @@ -42,31 +31,13 @@ #include "verify.h" #include "trim.h" #include "diskutil.h" -#include "cgroup.h" #include "profile.h" #include "lib/rand.h" #include "memalign.h" #include "server.h" -unsigned long page_mask; -unsigned long page_size; - -int groupid = 0; -unsigned int thread_number = 0; -unsigned int nr_process = 0; -unsigned int nr_thread = 0; -int shm_id = 0; -int temp_stall_ts; -unsigned long done_secs = 0; - -/* - * Just expose an empty list, if the OS does not support disk util stats - */ -#ifndef FIO_HAVE_DISK_UTIL -FLIST_HEAD(disk_list); -#endif - -unsigned long arch_flags = 0; +uintptr_t page_mask; +uintptr_t page_size; static int endian_check(void) { @@ -82,10 +53,10 @@ static int endian_check(void) else if (u.c[0] == 0x12) le = 1; -#if defined(FIO_LITTLE_ENDIAN) +#if defined(CONFIG_LITTLE_ENDIAN) if (be) return 1; -#elif defined(FIO_BIG_ENDIAN) +#elif defined(CONFIG_BIG_ENDIAN) if (le) return 1; #else @@ -108,6 +79,10 @@ int main(int argc, char *argv[], char *envp[]) return 1; } +#if !defined(CONFIG_GETTIMEOFDAY) && !defined(CONFIG_CLOCK_GETTIME) +#error "No available clock source!" +#endif + arch_init(envp); sinit(); @@ -133,6 +108,8 @@ int main(int argc, char *argv[], char *envp[]) if (parse_options(argc, argv)) return 1; + fio_time_init(); + if (nr_clients) return fio_handle_clients(); else