mirror of
https://github.com/facebook/zstd.git
synced 2025-11-29 00:04:37 -05:00
simplified "slows down when compression blocked"
This commit is contained in:
parent
c484345a82
commit
00c18c0c88
@ -896,12 +896,12 @@ FIO_compressZstdFrame(const cRess_t* ressPtr,
|
||||
assert(zfp.produced >= previous_zfp_update.produced);
|
||||
assert(g_nbWorkers >= 1);
|
||||
|
||||
/* test if output speed is so slow that all buffers are full
|
||||
* and no further progress is possible
|
||||
* (neither compression nor adding more input into internal buffers) */
|
||||
if ( (zfp.ingested == previous_zfp_update.ingested) /* no data read : input buffer full */
|
||||
&& (zfp.consumed == previous_zfp_update.consumed) /* no data compressed : no more buffer to compress OR compression is really slow */
|
||||
&& (zfp.nbActiveWorkers == 0) /* confirmed : no compression : either no more buffer to compress OR not enough data to start first worker */
|
||||
/* test if compression is blocked
|
||||
* either because output is slow and all buffers are full
|
||||
* or because input is slow and no job can start while waiting for at least one buffer to be filled.
|
||||
* note : excluse starting part, since currentJobID > 1 */
|
||||
if ( (zfp.consumed == previous_zfp_update.consumed) /* no data compressed : no data available, or no more buffer to compress to, OR compression is really slow (compression of a single block is slower than update rate)*/
|
||||
&& (zfp.nbActiveWorkers == 0) /* confirmed : no compression ongoing */
|
||||
) {
|
||||
DISPLAYLEVEL(6, "all buffers full : compression stopped => slow down \n")
|
||||
speedChange = slower;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user