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>
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>
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>
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>
mechanism for freeing allocations saved for reuse that have not been
used in a given time
Related-To: NEO-13425
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Calculate available memory for usm device reuse based as (total device
memory - used memory) * fraction for reuse.
Use sys mem allocs for devices without local memory.
Related-To: NEO-12902
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Add tracking of memory used for usm reuse mechanism when multiple cl
contexts are used.
Tracking for device added to NEO::Device, for host added to
NEO::MemoryManager.
This fixes usm reuse using x% of memory per each context instead of
globally.
Related-To: NEO-13308
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Allocations over a certain size will be checked for memory utilization
when chosen for reuse.
If utilization is below a threshold, they will not be reused.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Related-To: GSD-9385
In case of indirect allocations, we don't really know
their task count because we can't track their true usage
on GPU.
In case of non-blocking free, don't wait for latestSentTaskCount.
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
Do not put into usm reuse if is internal.
Set new isInternalAllocation flag for globals allocations.
Use actual size on device for tracking memory usage.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Do not put into usm reuse if is internal.
Set new isInternalAllocation flag for globals allocations.
Use actual size on device for tracking memory usage.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Allocating global surface is expecting that the usm allocation is zeroed
out. Reusing allocations can be filled with junk data and this caused
errors.
Resolves: HSD-18038551036, HSD-18038551766, HSD-18038551957, HSD-18038552252
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Query system total memory size and limit usm host allocation recycle to
use at most x%.
x is read from ExperimentalEnableDeviceAllocationCache for device and
ExperimentalEnableHostAllocationCache for host.
Related-To: GSD-7497
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Fix querying allocation info from pooled svm ptr.
Handle requested allocation alignment.
Refactor sorted vector usage.
Do not associate device with host pool allocation.
Related-To: NEO-9700
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Move code out to base class. This will allow to use the sorted vector
class with different values than only SvmData.
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>