From f274c6a208bb329298f83f05d0f9fe8e1a8b5423 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 12 Dec 2019 14:23:17 +0100 Subject: Don't kick off the threads until the queue is full The idea is as follows: Initially let the user submit blocks until the queue is filled, then kick of the threads. Every thread will end up getting a block without any waits until they completely deplete the queue. Assuming the threads take longer to process the data than it takes the main thread to do I/O and submit new blocks, the queue should stay mostly filled with minimal wait times. Signed-off-by: David Oberhollenzer --- lib/sqfs/data_writer/internal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/sqfs/data_writer/internal.h') diff --git a/lib/sqfs/data_writer/internal.h b/lib/sqfs/data_writer/internal.h index ea8fe79..24f520e 100644 --- a/lib/sqfs/data_writer/internal.h +++ b/lib/sqfs/data_writer/internal.h @@ -99,6 +99,7 @@ struct sqfs_data_writer_t { const sqfs_block_hooks_t *hooks; void *user_ptr; + bool notify_threads; /* file API */ sqfs_inode_generic_t *inode; -- cgit v1.2.3