mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Set VM advise with preferred location to device by default
Apply the KMD advise with preferred device location for KMD-migrated shared allocation to migrate to lmem on every GPU page fault (default KMD migration policy). Related-To: NEO-7851 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c0603e0854
commit
4e6995bc4c
@@ -228,7 +228,16 @@ int DrmMockPrelimContext::handlePrelimRequest(DrmIoctl request, void *arg) {
|
||||
} break;
|
||||
case DrmIoctl::GemVmAdvise: {
|
||||
const auto req = reinterpret_cast<prelim_drm_i915_gem_vm_advise *>(arg);
|
||||
receivedVmAdvise = VmAdvise{req->handle, req->attribute, {req->region.memory_class, req->region.memory_instance}};
|
||||
switch (req->attribute) {
|
||||
case PRELIM_I915_VM_ADVISE_ATOMIC_NONE:
|
||||
case PRELIM_I915_VM_ADVISE_ATOMIC_SYSTEM:
|
||||
case PRELIM_I915_VM_ADVISE_ATOMIC_DEVICE:
|
||||
receivedVmAdvise[0] = VmAdvise{req->handle, req->attribute};
|
||||
break;
|
||||
case PRELIM_I915_VM_ADVISE_PREFERRED_LOCATION:
|
||||
receivedVmAdvise[1] = VmAdvise{req->handle, req->attribute, {req->region.memory_class, req->region.memory_instance}};
|
||||
break;
|
||||
}
|
||||
return vmAdviseReturn;
|
||||
} break;
|
||||
case DrmIoctl::UuidRegister: {
|
||||
|
||||
@@ -127,7 +127,7 @@ struct DrmMockPrelimContext {
|
||||
size_t waitUserFenceCalled{0};
|
||||
std::optional<WaitUserFence> receivedWaitUserFence{};
|
||||
|
||||
std::optional<VmAdvise> receivedVmAdvise{};
|
||||
std::optional<VmAdvise> receivedVmAdvise[2]{};
|
||||
int vmAdviseReturn{0};
|
||||
|
||||
int mmapOffsetReturn{0};
|
||||
|
||||
Reference in New Issue
Block a user