mksquashfs: queue fragment and empty file buffers directly to main thread

Queue these buffers directly to the main thread, rather than
queuing them to the deflate threads which pass them to the main thread.

For empty file buffers these are passed directly to the main thread,
and it is unnecessary overhead to pass them to the deflate threads.
For fragments these were passed to the deflate threads for sparse
checking, but move sparse checking for fragments to the main
thread.

Doing this frees up the deflate threads to concentrate on
compressing buffers.  It also means the reader thread to deflate
queue now accurately represents the number of uncompressed
buffers in flight to the deflate threads, without the value being
obscured by the presence of the other buffers.  The number of
uncompressed fragment buffers in flight from the reader thead
to the main thread can be seen from the uncompressed fragment queue.

Also add a function which centralises the logic which decides where
to send the buffers.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
1 file changed
tree: b9810bd059fd7119896627f28a289059a0bc3c35
  1. kernel/
  2. kernel-2.4/
  3. squashfs-tools/
  4. README