Make lockmem a per job option

We need to get rid of per job options that fiddle with global
state. It's confusing, and it breaks remote option handling.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

Conflicts:
	backend.c
	fio.h
	init.c
	options.c

Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/fio.h b/fio.h
index e55413a..2c8d904 100644
--- a/fio.h
+++ b/fio.h
@@ -308,6 +308,8 @@
 	 */
 	struct prof_io_ops prof_io_ops;
 	void *prof_data;
+
+	void *pinned_mem;
 };
 
 /*
@@ -348,7 +350,6 @@
 extern int groupid;
 extern int output_format;
 extern int temp_stall_ts;
-extern unsigned long long mlock_size;
 extern uintptr_t page_mask, page_size;
 extern int read_only;
 extern int eta_print;
@@ -481,8 +482,8 @@
 /*
  * Memory helpers
  */
-extern int __must_check fio_pin_memory(void);
-extern void fio_unpin_memory(void);
+extern int __must_check fio_pin_memory(struct thread_data *);
+extern void fio_unpin_memory(struct thread_data *);
 extern int __must_check allocate_io_mem(struct thread_data *);
 extern void free_io_mem(struct thread_data *);