X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio.h;h=b9ae15bf29a9f07c56025002176eb2041644c82d;hp=e279574a387026ab07e5b975df2a51fe5d384d0e;hb=2f9ade3cb72218eb260f4f5e6914218bdcaa2bcc;hpb=a9619d44b439ac9c0d292925a5b4fd1b944d1263 diff --git a/fio.h b/fio.h index e279574a..b9ae15bf 100644 --- a/fio.h +++ b/fio.h @@ -181,7 +181,6 @@ struct thread_data { unsigned char sequential; unsigned char odirect; - unsigned char create_file; unsigned char invalidate_cache; unsigned char create_serialize; unsigned char create_fsync; @@ -193,6 +192,8 @@ struct thread_data { unsigned char do_disk_util; unsigned char override_sync; unsigned char rand_repeatable; + unsigned char write_lat_log; + unsigned char write_bw_log; unsigned int bs; unsigned int min_bs; @@ -338,8 +339,6 @@ extern struct io_u *__get_io_u(struct thread_data *); extern void put_io_u(struct thread_data *, struct io_u *); extern int rate_quit; -extern int write_lat_log; -extern int write_bw_log; extern int exitall_on_terminate; extern int thread_number; extern int shm_id; @@ -448,6 +447,7 @@ extern int init_random_state(struct thread_data *); */ extern void close_files(struct thread_data *); extern int setup_files(struct thread_data *); +extern int file_invalidate_cache(struct thread_data *, struct fio_file *); /* * ETA/status stuff @@ -479,6 +479,14 @@ extern void populate_verify_io_u(struct thread_data *, struct io_u *); extern int get_next_verify(struct thread_data *td, struct io_u *); extern int do_io_u_verify(struct thread_data *, struct io_u **); +/* + * Memory helpers + */ +extern int fio_pin_memory(void); +extern void fio_unpin_memory(void); +extern int allocate_io_mem(struct thread_data *); +extern void free_io_mem(struct thread_data *); + /* * This is a pretty crappy semaphore implementation, but with the use that fio * has (just signalling start/go conditions), it doesn't have to be better. @@ -539,7 +547,9 @@ extern void close_ioengine(struct thread_data *); */ #define fio_unused __attribute((__unused__)) +#define for_each_td(td, i) \ + for ((i) = 0, (td) = &threads[0]; (i) < (int) thread_number; (i)++, (td)++) #define for_each_file(td, f, i) \ - for ((i) = 0, (f) = &(td)->files[0]; (i) < (td)->nr_files; (i)++, (f) = &(td)->files[(i)]) + for ((i) = 0, (f) = &(td)->files[0]; (i) < (int) (td)->nr_files; (i)++, (f)++) #endif