summaryrefslogtreecommitdiff
path: root/lib/rendercopy_gen8.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-06-21 15:14:57 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2018-07-03 11:03:54 +0100
commit199220052af977598033d3810ffb4cc32d377522 (patch)
tree2b6f7954898a440f73bff9724ee0c9f52725ea8e /lib/rendercopy_gen8.c
parent840d12e2f050b784552197403d6575a57b6e896d (diff)
lib: Report file cache as available system memory
sysinfo() doesn't include all reclaimable memory. In particular it excludes the majority of global_node_page_state(NR_FILE_PAGES), reclaimable pages that are a copy of on-disk files It seems the only way to obtain this counter is by parsing /proc/meminfo. For comparison, check vm_enough_memory() which includes NR_FILE_PAGES as available (sadly there's no way to call vm_enough_memory() directly either!) v2: Pay attention to what one writes. v3: Trim off redundant space, and warn if the requested tags do not match the layout of /proc/meminfo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'lib/rendercopy_gen8.c')
0 files changed, 0 insertions, 0 deletions