SWDEV-576718 - provide option to limit memory cache usage (#2810)

* SWDEV-576718 - provide option to limit memory cache usage

* SWDEV-576718 - Use MiB instead of MB in description
Tento commit je obsažen v:
Xie, AlexBin
2026-01-26 11:35:01 -05:00
odevzdal GitHub
rodič 265d0a2d2b
revize e22c9b457e
2 změnil soubory, kde provedl 6 přidání a 1 odebrání
+3
Zobrazit soubor
@@ -347,6 +347,9 @@ bool Settings::create(const Pal::DeviceProperties& palProp,
#endif
}
resourceCacheSize_ = std::min(resourceCacheSize_,
(uint64_t)GPU_MAX_RESOURCE_CACHE_SIZE * Mi);
// If is Rebar, override prepinned memory size.
if ((heaps[Pal::GpuHeapInvisible].logicalSize == 0) &&
(heaps[Pal::GpuHeapLocal].logicalSize > 256 * Mi)) {
+3 -1
Zobrazit soubor
@@ -83,7 +83,9 @@ release(size_t, GPU_PINNED_XFER_SIZE, 32, \
release(size_t, GPU_PINNED_MIN_XFER_SIZE, 128, \
"The minimal buffer size for pinned read/write transfers in MiB") \
release(size_t, GPU_RESOURCE_CACHE_SIZE, 64, \
"The resource cache size in MB") \
"The resource cache size in MiB") \
release(size_t, GPU_MAX_RESOURCE_CACHE_SIZE, 16777216, \
"The max resource cache size in MiB") \
release(size_t, GPU_MAX_SUBALLOC_SIZE, 4096, \
"The maximum size accepted for suballocations in KB") \
release(size_t, GPU_NUM_MEM_DEPENDENCY, 256, \