Improve mmap logic in createAllocWithAlignment

Group small allocations and reuse mapped memory in order to keep map
count small.

Related-To: NEO-6417

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2022-01-24 16:44:38 +00:00
committed by Compute-Runtime-Automation
parent f064f7dd67
commit 0424f30782
8 changed files with 187 additions and 20 deletions

View File

@@ -179,6 +179,8 @@ DECLARE_DEBUG_VARIABLE(int32_t, EngineUsageHint, -1, "-1: default, >=0: engine u
DECLARE_DEBUG_VARIABLE(int32_t, ForceBcsEngineIndex, -1, "-1: default, >=0 Copy Engine index")
DECLARE_DEBUG_VARIABLE(int32_t, Force2dImageAsArray, -1, "-1: default, 0: WA Disabled, 1: Forces surface state of 2dImage to array")
DECLARE_DEBUG_VARIABLE(int32_t, ForceExtendedBufferSize, -1, "-1: default, 0: disabled, >=1: Forces extended buffer size by specify pageSize number in clCreateBuffer, clCreateBufferWithProperties and clCreateBufferWithPropertiesINTEL calls")
DECLARE_DEBUG_VARIABLE(int32_t, OverrideMaxAllocationSizeForMapReuseBufferInMb, -1, "-1: default, >=0: Forces maximal allocation size eligible to reuse map buffer")
DECLARE_DEBUG_VARIABLE(int32_t, OverrideMapReuseBufferSizeInMb, -1, "-1: default, >=0: Forces size of the map reuse buffer")
/*LOGGING FLAGS*/
DECLARE_DEBUG_VARIABLE(int32_t, PrintDriverDiagnostics, -1, "prints driver diagnostics messages to standard output, value corresponds to hint level")