HomeFreeBSD

kboot: Parse memory usage

Description

kboot: Parse memory usage

To properly size segments, we have to know how much memory we have in
the system, as well as how much this process can allocate. Due to our
inability to overcommit, we need to know how much memory is
available. commit_limit is the grand total allowed. committed_as is the
current memory used. mem_avail is what Linux tells us is available. Find
these from /proc/meminfo. We'll use them later to allocate the biggest
possible segment sizes, but for now print the raw numbers.

Sponsored by: Netflix
Reviewed by: kevans (earlier version)
Differential Revision: https://reviews.freebsd.org/D38267

Details

Provenance
impAuthored on Feb 2 2023, 8:11 PM
Reviewer
kevans
Differential Revision
D38267: kboot: Parse memory usage
Parents
rG2e1edd04eb01: kboot: For hostfs, return better errors from read, where possible.
Branches
Unknown
Tags
Unknown