[perf] Prefetch of kmd-migrated shared allocation with initial placement on GPU

Related-To: NEO-7646

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2023-04-25 13:54:13 +00:00
committed by Compute-Runtime-Automation
parent 06bd405e88
commit c9fdeb200c
5 changed files with 117 additions and 0 deletions

View File

@@ -240,6 +240,12 @@ int DrmMockPrelimContext::handlePrelimRequest(DrmIoctl request, void *arg) {
}
return vmAdviseReturn;
} break;
case DrmIoctl::GemVmPrefetch: {
const auto req = static_cast<prelim_drm_i915_gem_vm_prefetch *>(arg);
vmPrefetchCalled++;
receivedVmPrefetch.push_back(VmPrefetch{req->vm_id, req->region});
return 0;
} break;
case DrmIoctl::UuidRegister: {
auto uuidControl = reinterpret_cast<prelim_drm_i915_uuid_control *>(arg);

View File

@@ -78,6 +78,11 @@ struct VmAdvise {
MemoryClassInstance memoryRegions{0};
};
struct VmPrefetch {
uint32_t vmId{0};
uint32_t region{0};
};
struct UuidVmBindExt {
uint32_t handle{0};
uint64_t nextExtension{0};
@@ -130,6 +135,9 @@ struct DrmMockPrelimContext {
std::optional<VmAdvise> receivedVmAdvise[2]{};
int vmAdviseReturn{0};
size_t vmPrefetchCalled{0};
std::vector<VmPrefetch> receivedVmPrefetch{};
int mmapOffsetReturn{0};
uint32_t uuidHandle{1};