SWDEV-323702 - Use active queue for transfer
Pass active queue for transfers in the cache coherency layer.
That will allow to use device transfer queue only for
cases when active queue isn't available, because using device
transfer queue from another active queue may cause a deadlock
Change-Id: Ifbe7e0303b77dbf6eeda3939ffbc25a3df7472de
[ROCm/clr commit: 95d55fdfa8]
이 커밋은 다음에 포함됨:
1 부모
62dbceb61c
커밋
c52280ae72
9 파일이 변경됨
+58
-48
검색과 일치하는 파일 없음
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2010 - 2021 Advanced Micro Devices, Inc.
|
||||
/* Copyright (c) 2010 - 2022 Advanced Micro Devices, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -412,7 +412,7 @@ Memory::~Memory() {
|
||||
if (NULL != parent_) {
|
||||
// Update cache if runtime destroys a subbuffer
|
||||
if (NULL != parent_->getHostMem() && (vDev_ == NULL)) {
|
||||
cacheWriteBack();
|
||||
cacheWriteBack(nullptr);
|
||||
}
|
||||
parent_->removeSubBuffer(this);
|
||||
}
|
||||
@@ -475,20 +475,20 @@ void Memory::signalWrite(const Device* writer) {
|
||||
}
|
||||
}
|
||||
|
||||
void Memory::cacheWriteBack() {
|
||||
void Memory::cacheWriteBack(device::VirtualDevice* vDev) {
|
||||
if (NULL != lastWriter_) {
|
||||
device::Memory* dmem = getDeviceMemory(*lastWriter_);
|
||||
//! @note It's a special condition, when a subbuffer was created,
|
||||
//! but never used. Thus dev memory is still NULL and lastWriter_
|
||||
//! was passed from the parent.
|
||||
if (NULL != dmem) {
|
||||
dmem->syncHostFromCache();
|
||||
dmem->syncHostFromCache(vDev);
|
||||
}
|
||||
} else if (isParent()) {
|
||||
// On CPU parent can't be synchronized, because lastWriter_ could be NULL
|
||||
// and syncHostFromCache() won't be called.
|
||||
for (uint i = 0; i < numDevices_; ++i) {
|
||||
deviceMemories_[i].value_->syncHostFromCache();
|
||||
deviceMemories_[i].value_->syncHostFromCache(vDev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
새 이슈에서 참조
사용자 차단