mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Enable 64kb pages when its allowed by platform
Change-Id: I10f02bd83beabeff929e16c7293324b81bfed054
This commit is contained in:
@@ -113,7 +113,7 @@ void *MemoryManager::allocateSystemMemory(size_t size, size_t alignment) {
|
||||
|
||||
GraphicsAllocation *MemoryManager::allocateGraphicsMemoryForSVM(size_t size, bool coherent) {
|
||||
GraphicsAllocation *graphicsAllocation = nullptr;
|
||||
if (enable64kbpages) {
|
||||
if (peek64kbPagesEnabled()) {
|
||||
graphicsAllocation = allocateGraphicsMemory64kb(size, MemoryConstants::pageSize64k, false);
|
||||
} else {
|
||||
graphicsAllocation = allocateGraphicsMemory(size);
|
||||
@@ -424,7 +424,7 @@ GraphicsAllocation *MemoryManager::allocateGraphicsMemory(const AllocationData &
|
||||
if (allocationData.hostPtr) {
|
||||
return allocateGraphicsMemory(allocationData.size, allocationData.hostPtr, allocationData.flags.forcePin);
|
||||
}
|
||||
if (enable64kbpages && allocationData.flags.allow64kbPages) {
|
||||
if (peek64kbPagesEnabled() && allocationData.flags.allow64kbPages) {
|
||||
return allocateGraphicsMemory64kb(allocationData.size, MemoryConstants::pageSize64k, allocationData.flags.forcePin);
|
||||
}
|
||||
return allocateGraphicsMemory(allocationData.size, MemoryConstants::pageSize, allocationData.flags.forcePin, allocationData.flags.uncacheable);
|
||||
|
||||
@@ -193,6 +193,7 @@ class MemoryManager {
|
||||
|
||||
virtual GraphicsAllocation *createGraphicsAllocation(OsHandleStorage &handleStorage, size_t hostPtrSize, const void *hostPtr) = 0;
|
||||
|
||||
bool peek64kbPagesEnabled() const { return enable64kbpages; }
|
||||
bool peekForce32BitAllocations() { return force32bitAllocations; }
|
||||
void setForce32BitAllocations(bool newValue);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user