mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
fix: use condition variables instead of busy waits in worker threads
Resolves: NEO-16085, GSD-11678, HSD-14025819208 Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
49293fcac6
commit
452475a0b9
@@ -68,6 +68,7 @@ class ProductHelper;
|
||||
class ReleaseHelper;
|
||||
enum class WaitStatus;
|
||||
struct AubSubCaptureStatus;
|
||||
struct ConditionVarSyncData;
|
||||
|
||||
template <typename TSize, uint32_t packetCount>
|
||||
class TimestampPackets;
|
||||
@@ -569,6 +570,8 @@ class CommandStreamReceiver : NEO::NonCopyableAndNonMovableClass {
|
||||
HostFunctionData &getHostFunctionData();
|
||||
GraphicsAllocation *getHostFunctionDataAllocation();
|
||||
|
||||
void setDirectSubmissionControllerSyncData(ConditionVarSyncData *syncData) { directSubmissionControllerSyncData = syncData; }
|
||||
|
||||
protected:
|
||||
MOCKABLE_VIRTUAL void initializeHostFunctionData();
|
||||
|
||||
@@ -588,6 +591,8 @@ class CommandStreamReceiver : NEO::NonCopyableAndNonMovableClass {
|
||||
void downloadTagAllocation(TaskCountType taskCountToWait);
|
||||
void printTagAddressContent(TaskCountType taskCountToWait, int64_t waitTimeout, bool start);
|
||||
virtual void addToEvictionContainer(GraphicsAllocation &gfxAllocation);
|
||||
void incrementTaskCountAndNotifyNewSubmission();
|
||||
void notifyNewSubmission();
|
||||
|
||||
[[nodiscard]] MOCKABLE_VIRTUAL std::unique_lock<MutexType> obtainHostPtrSurfaceCreationLock();
|
||||
|
||||
@@ -652,6 +657,8 @@ class CommandStreamReceiver : NEO::NonCopyableAndNonMovableClass {
|
||||
TaskCountType *completionFenceValuePointer = nullptr;
|
||||
HostFunctionData hostFunctionData;
|
||||
|
||||
ConditionVarSyncData *directSubmissionControllerSyncData = nullptr;
|
||||
|
||||
std::atomic<TaskCountType> barrierCount{0};
|
||||
// current taskLevel. Used for determining if a PIPE_CONTROL is needed.
|
||||
std::atomic<TaskCountType> taskLevel{0};
|
||||
|
||||
Reference in New Issue
Block a user