compression thread should take measurements independently based on whether or not the create/write thread will actually bottleneck performance
This commit is contained in:
@@ -412,14 +412,17 @@ static void* compressionThread(void* arg)
|
|||||||
pthread_mutex_unlock(&ctx->jobWrite_mutex.pMutex);
|
pthread_mutex_unlock(&ctx->jobWrite_mutex.pMutex);
|
||||||
|
|
||||||
|
|
||||||
if (willWaitForCreate || willWaitForWrite) {
|
if (willWaitForCreate) {
|
||||||
DEBUG(2, "compression will wait for create or write on job %u\n", currJob);
|
DEBUG(2, "compression will wait for create on job %u\n", currJob);
|
||||||
|
|
||||||
pthread_mutex_lock(&ctx->createCompletion_mutex.pMutex);
|
pthread_mutex_lock(&ctx->createCompletion_mutex.pMutex);
|
||||||
ctx->compressWaitCreateCompletion = ctx->createCompletion;
|
ctx->compressWaitCreateCompletion = ctx->createCompletion;
|
||||||
DEBUG(2, "create completion %f\n", ctx->compressWaitCreateCompletion);
|
DEBUG(2, "create completion %f\n", ctx->compressWaitCreateCompletion);
|
||||||
pthread_mutex_unlock(&ctx->createCompletion_mutex.pMutex);
|
pthread_mutex_unlock(&ctx->createCompletion_mutex.pMutex);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (willWaitForWrite) {
|
||||||
|
DEBUG(2, "compression will wait for write on job %u\n", currJob);
|
||||||
pthread_mutex_lock(&ctx->writeCompletion_mutex.pMutex);
|
pthread_mutex_lock(&ctx->writeCompletion_mutex.pMutex);
|
||||||
ctx->compressWaitWriteCompletion = ctx->writeCompletion;
|
ctx->compressWaitWriteCompletion = ctx->writeCompletion;
|
||||||
DEBUG(2, "write completion %f\n", ctx->compressWaitWriteCompletion);
|
DEBUG(2, "write completion %f\n", ctx->compressWaitWriteCompletion);
|
||||||
|
|||||||
Reference in New Issue
Block a user