fix(ocl): do not multiply kmdNotify waitTimeout

With direct submission disabled this resulted in waitTimeout long enough
that kmdWait fallback was rarely used.
This caused more CPU spin time.

Related-To: GSD-3612

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2023-06-29 14:21:41 +00:00
committed by Compute-Runtime-Automation
parent eb4e7fb2a6
commit 10ac167bdc
7 changed files with 27 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2022 Intel Corporation
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -39,8 +39,8 @@ WaitParams KmdNotifyHelper::obtainTimeoutParams(bool quickKmdSleepRequest,
return WaitParams{false, true, 1};
}
int64_t multiplier = (currentHwTag < taskCountToWait) ? static_cast<int64_t>(taskCountToWait - currentHwTag) : 1;
if (!properties->enableKmdNotify && multiplier > KmdNotifyConstants::minimumTaskCountDiffToCheckAcLine) {
const int64_t taskCountDiff = (currentHwTag < taskCountToWait) ? static_cast<int64_t>(taskCountToWait - currentHwTag) : 1;
if (!properties->enableKmdNotify && taskCountDiff > KmdNotifyConstants::minimumTaskCountDiffToCheckAcLine) {
updateAcLineStatus();
}
@@ -54,7 +54,7 @@ WaitParams KmdNotifyHelper::obtainTimeoutParams(bool quickKmdSleepRequest,
} else if (directSubmissionEnabled && properties->enableQuickKmdSleepForDirectSubmission) {
params.waitTimeout = properties->delayQuickKmdSleepForDirectSubmissionMicroseconds;
} else {
params.waitTimeout = getBaseTimeout(multiplier);
params.waitTimeout = getBaseTimeout();
}
params.enableTimeout = (properties->enableKmdNotify || !acLineConnected);