Do not reuse internal or imported allocations.
Mark as aub writable on getting from reuse.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
adjust ULTs
disable usm reuse in multi device l0
don't initialize usm caches if max reuse size is 0
check requested alignment when returning from cache
guard against double free
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
- Add isaPaddingIncluded flag to AllocationProperties to control ISA
padding
- Modify MemoryManager to skip automatic padding when flag is set
- Update ISAPoolAllocator to manage padding explicitly and set the
flag
- Use actual buffer size for HeapAllocator instead of requested size
- Add test covering different padding scenarios
This prevents double padding addition which was wasting memory when
ISAPoolAllocator managed its own padding on top of MemoryManager's
automatic padding.
Related-To: NEO-12287, HSD-18042276431
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
Move getting usm pool for ptr to its own method.
Move trying to free via pooling to its own method.
Use base ptr of pool for tracking in IPCHandleMap.
Track ipc handle refcount in freeMem.
Return error when trying to use a not allocated ptr within pool.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Allow the application to force storageInfo.localOnly and get the
out-of-memory returned if not possible.
This is a windows-only feature supported on discrete platforms.
Related-To: NEO-13428
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
DeferredDeleter instance could get deleted before worker thread called
unlock() on queue mutex leading to an error
Related-To: NEO-14896
Signed-off-by: Oskar Hubert Weber <oskar.hubert.weber@intel.com>
Related-To: NEO-14360
Current gmm usage type of these resources is causing
them to be cached, which is incorrect.
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
Use device compression defaults when allocating pool.
Ignore compression hints when allocating from pool.
Also remove unused late initialization methods.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Join thread in DllMain (which we are not aware of)
can result in hang occurring in DeferredDeleter, if the library is
freed before FreeLibraryAndExitThread call from within the worker thread,
the thread gets stuck, thus the main thread is stuck on worker->join().
Related-To: NEO-14121
Signed-off-by: Oskar Hubert Weber <oskar.hubert.weber@intel.com>
Join thread in DllMain (which we are not aware of)
can result in hang occurring in DeferredDeleter, if the library is
freed before FreeLibraryAndExitThread call from within the worker thread,
the thread gets stuck, thus the main thread is stuck on worker->join().
Related-To: NEO-14121
Signed-off-by: Oskar Hubert Weber <oskar.hubert.weber@intel.com>
Related-To: NEO-13715
Implements basic functionality for zeCommandListAppendMemoryAdvise for
system allocator
Signed-off-by: Chandio, Bibrak Qamar <bibrak.qamar.chandio@intel.com>
Align local memory allocations of tag types to 2MB when
2MB alignment is enabled via the product helper
(is2MBLocalMemAlignmentEnabled flag).
Refactored the allocateGraphicsMemoryInDevicePool function to improve
readability and maintainability. Simplified the logic for
determining base size and final alignment by reducing redundant code.
Related-To: NEO-12287
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
When trimming old allocations in usm reuse start from largest
allocations.
This will reduce memory usage more quickly once max hold time is hit.
Related-To: NEO-6893, NEO-14429
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Real allocation size should be used to properly apply limits and allow
more usm reuse hits.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Save svmData on putting into reuse, instead of searching each time.
Change UNRECOVERABLE_IF to DEBUG_BREAK_IF.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Host usm and device usm for igfx checks system memory usage.
Device usm for dgfx checks local memory usage.
If used memory is above limit threshold:
- no new allocations will be saved for reuse
- cleaner will use shorter hold time of 2 seconds
- cleaner will free all eligible allocations, regardless of async
deleter thread having work
Motivation: in case of gfx memory being full, making resident new
allocations will require evictions which leads to massive slowdown on
enqueue calls.
This change aims to minimize cases where extra memory usage from usm
reuse mechanism leads to above situation.
Related-To: NEO-6893, NEO-14160
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
If flag "LogUsmReuse" is set, usm reuse will log operations to csv file.
Each line will contain: timestamp, host/device, operation type,
allocation size, true/false whether operation succeeded.
This data can then be used to produce graphs and help in analyzing
usm reuse in a particular workload.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>