diff options
author | Phillip Lougher <phillip@squashfs.org.uk> | 2013-03-19 21:00:52 +0000 |
---|---|---|
committer | Mohamad Ayyash <mkayyash@google.com> | 2015-02-23 12:35:47 -0800 |
commit | 54e655acfe27608ff23dd985a6f7a7e61156b367 (patch) | |
tree | cf276805460b20093b502065b11b5de2ca936146 /squashfs-tools/progressbar.h | |
parent | 3dbea5763e6ed097819a801aaa591999de6ef661 (diff) | |
download | squashfs-tools-54e655acfe27608ff23dd985a6f7a7e61156b367.tar.gz |
mksquashfs: get rid of update_progress_bar()
Don't display the progress bar every time a file is written
as the background 1/4 second display is sufficient.
Removing this eliminates an unanticipated main thread dependency
on the progress bar thread. By grabbing the progress_mutex mutex
before doing the pthread_cond_signal() to wake up the progress bar
thread it means the main thread waits on the progress_mutex mutex
if the progress bar thread already has it grabbed. Normally
when the progress bar wakes up it grabs the progress_mutex mutex
prints the progress bar and quickly releases the mutex, and so
the main thread will never wait on the mutex. However, if
the progress bar printing is slow, the main thread can wake up
the progress bar thread when a file is written, and it can
still be printing the progress bar when the main thread writes
the next file, causing the main thread to wait.
In effect this throttles file writing to the speed of the progress
bar printing, normally this has no effect because progress bar
printing is faster, however, if the output terminal is running
over a slow link this can become a bottleneck. The author
has noticed this running Mksquashfs on a VT102 connected via a
9600 baud serial line.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
Diffstat (limited to 'squashfs-tools/progressbar.h')
-rw-r--r-- | squashfs-tools/progressbar.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/squashfs-tools/progressbar.h b/squashfs-tools/progressbar.h index c40817e..34f9b77 100644 --- a/squashfs-tools/progressbar.h +++ b/squashfs-tools/progressbar.h @@ -25,7 +25,6 @@ extern void inc_progress_bar(); extern void dec_progress_bar(int count); extern void progress_bar_size(int count); -extern void update_progress_bar(); extern void enable_progress_bar(); extern void disable_progress_bar(); extern void init_progress_bar(); |