mesa/src/intel
Kenneth Graunke a7b054c974 anv: Don't report more memory available than the heap size
When calculating the system memory heap size, we report only 3/4 of
the total RAM size (or 1/2 for systems with less than 4GB of RAM).

In the memory budget extension query, we were reporting 90% of the
available system memory.  If most of the memory in the system is free,
this could result in the total heap size being 3/4 of RAM, but the
memory available being 9/10 of RAM.  But if the application tried to
allocate the memory reported as "available", it would exceed the heap
size.  This can confuse some applications.

This patch makes the memory budget query clamp the available RAM to
the heap size, so it will never report more available than the heap
can provide.  Unfortunately, this means that we'll report only 67.5%
of system memory as available (3/4 * 9/10).  We may want to adjust
this estimate in the future.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26553>
2023-12-07 15:12:38 -08:00
..
blorp blorp: Handle stencil buffer compression on blitter engine 2023-12-06 04:39:09 +00:00
ci intel/ci: run only the relevant jobs when changing the ci expectations 2023-12-07 09:59:39 +00:00
common intel: Sync xe_drm.h take 2 part 3 2023-12-06 17:35:23 +00:00
compiler intel/compiler: infer the number of operands using lsc_op_num_data_values 2023-12-07 14:40:24 +00:00
dev intel: Sync xe_drm.h take 2 part 3 2023-12-06 17:35:23 +00:00
ds intel/ds: add trace of buffer markers 2023-11-29 01:16:22 +00:00
genxml intel/genxml/xe2: Update PIPELINE_SELECT 2023-12-07 14:16:18 +00:00
isl intel: Generate source file with utf-8 encoding from mako template 2023-12-07 12:41:07 +00:00
nullhw-layer meson: support installation tags 2023-09-11 13:00:45 +00:00
perf intel: Remove unused ALIGN macro 2023-12-07 02:30:53 +00:00
tools intel/tools: 32bit compile fixes 2023-12-05 17:45:18 +00:00
vulkan anv: Don't report more memory available than the heap size 2023-12-07 15:12:38 -08:00
vulkan_hasvk treewide: Avoid use align as variable, replace it with other names 2023-12-07 02:30:53 +00:00
meson.build intel: Only build perf if drivers or tools are enabled 2023-08-31 21:53:19 +00:00