Use blocking free policy when cleaning up usm reuse
Also clean usm reuse first when destroying platform,
since there is no point in reusing on closing application.
Related-To: HSD-18043613805, HSD-13013909538
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Related-To: NEO-13715
Provides implmentation of getAtomicAccessAttribute using system
allocator.
Completes the implementation of the madvise feature using the
new IOCTLs in xe_drm header.
Signed-off-by: Chandio, Bibrak Qamar <bibrak.qamar.chandio@intel.com>
- Added support for creating and managing opaque IPC NT handles in the
WDDM layer.
- Introduced a new flag `shareableWithoutNTHandle` to indicate if memory
can be shared without an NT handle.
- Updated the `isShareableMemory` method to accommodate this new flag.
- Added debug variable EnableShareableWithoutNTHandle to control the
behavior of sharing memory without NT handles until requested.
- Updated Linux path to enable sharing DMA Buf FDs between processes
for use in pidfd_getfd
- Updated getfd and get IPC Handle helper functions to support opaque or
previous versions
Related-To: NEO-15345 , NEO-15346 , NEO-15347, NEO-10380
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
- Added support for creating and managing opaque IPC NT handles in the
WDDM layer.
- Introduced a new flag `shareableWithoutNTHandle` to indicate if memory
can be shared without an NT handle.
- Updated the `isShareableMemory` method to accommodate this new flag.
- Added debug variable EnableShareableWithoutNTHandle to control the
behavior of sharing memory without NT handles until requested.
- Updated Linux path to enable sharing DMA Buf FDs between processes
for use in pidfd_getfd
Related-To: NEO-15345 , NEO-15346 , NEO-15347, NEO-10380
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
When allocation is saved for reuse, remove it from allocations map.
On get from reuse, reinsert it with new allocId.
Allocations saved for reuse should not be made resident for indirect
access.
Only applicable on aub/tbx csr types.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
On getting from reuse update alloc id and increment allocations counter.
This is to ensure that making indirect allocations resident picks up the
reuse allocation.
Only applicable on aub/tbx csr types.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
on blocking free wait for engines completion before putting into reuse
mark allocation as completed and do not check is in use status on
getting
Related-To: NEO-6893, HSD-18042686276
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
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>
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>
Cleaner thread will run every 15ms instead of 2s.
Allocations will be held for at least 10s.
If deferred deleter has elements to release, will skip cleaning cache.
Will clean only 1 allocation per cache, per cleaning run.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>