iolog: run compression work at slightly elevated nice level
Add support for work items to contain a priority, and use this
directly with nice. Run compression at nice 1, to make it slightly
less important than the actual IO jobs.
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/lib/tp.h b/lib/tp.h
index 5b07cc6..9147cc2 100644
--- a/lib/tp.h
+++ b/lib/tp.h
@@ -10,6 +10,7 @@
struct flist_head list;
tp_work_fn *fn;
int wait;
+ int prio;
pthread_cond_t cv;
pthread_mutex_t lock;
volatile int done;