mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 15:12:56 +08:00
Optimize first access to shared allocations
Change-Id: Ia3ce5f1e448128e7c9dfffb9ad49aaee15bdf948 Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com> Related-To: NEO-5059
This commit is contained in:
committed by
sys_ocldev
parent
a28e883691
commit
97ec64d22c
@@ -10,6 +10,8 @@
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
#include "shared/source/utilities/spinlock.h"
|
||||
|
||||
#include "memory_properties_flags.h"
|
||||
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
@@ -24,15 +26,21 @@ class PageFaultManager : public NonCopyableOrMovableClass {
|
||||
|
||||
void moveAllocationToGpuDomain(void *ptr);
|
||||
void moveAllocationsWithinUMAllocsManagerToGpuDomain(SVMAllocsManager *unifiedMemoryManager);
|
||||
void insertAllocation(void *ptr, size_t size, SVMAllocsManager *unifiedMemoryManager, void *cmdQ);
|
||||
void insertAllocation(void *ptr, size_t size, SVMAllocsManager *unifiedMemoryManager, void *cmdQ, const MemoryProperties &memoryProperties);
|
||||
void removeAllocation(void *ptr);
|
||||
|
||||
enum class AllocationDomain {
|
||||
None,
|
||||
Cpu,
|
||||
Gpu,
|
||||
};
|
||||
|
||||
protected:
|
||||
struct PageFaultData {
|
||||
size_t size;
|
||||
SVMAllocsManager *unifiedMemoryManager;
|
||||
void *cmdQ;
|
||||
bool isInGpuDomain;
|
||||
AllocationDomain domain;
|
||||
};
|
||||
|
||||
virtual void allowCPUMemoryAccess(void *ptr, size_t size) = 0;
|
||||
|
||||
Reference in New Issue
Block a user