Page MenuHomeFreeBSD

kboot: Parse memory usage
ClosedPublic

Authored by imp on Jan 29 2023, 3:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 10, 4:36 PM
Unknown Object (File)
Wed, May 1, 3:27 AM
Unknown Object (File)
Tue, Apr 30, 10:44 AM
Unknown Object (File)
Sat, Apr 27, 7:19 AM
Unknown Object (File)
Mar 14 2024, 9:58 PM
Unknown Object (File)
Mar 14 2024, 9:58 PM
Unknown Object (File)
Mar 14 2024, 9:58 PM
Unknown Object (File)
Mar 14 2024, 9:58 PM
Subscribers

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Jan 29 2023, 3:17 PM
imp retitled this revision from stand: Parse memory usage to kboot: Parse memory usage.Feb 1 2023, 11:14 PM
imp edited the summary of this revision. (Show Details)

rebase / refactor / redo

kevans added inline comments.
stand/kboot/main.c
53

static these for now? I /think/ the later use is isolated in main.c, probably another one to double-check against your branch

74

The indentation here seems to be a bit funky

This revision is now accepted and ready to land.Feb 2 2023, 4:01 AM
This revision now requires review to proceed.Feb 2 2023, 4:33 AM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 2 2023, 8:16 PM
Closed by commit rG7da605ec03c1: kboot: Parse memory usage (authored by imp). · Explain Why
This revision was automatically updated to reflect the committed changes.