Page MenuHomeFreeBSD

kboot: Parse memory usage
ClosedPublic

Authored by imp on Jan 29 2023, 3:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 8:04 AM
Unknown Object (File)
Thu, Nov 14, 1:12 AM
Unknown Object (File)
Wed, Nov 13, 3:27 PM
Unknown Object (File)
Tue, Nov 12, 7:52 AM
Unknown Object (File)
Tue, Nov 12, 6:07 AM
Unknown Object (File)
Mon, Nov 11, 1:12 PM
Unknown Object (File)
Mon, Nov 11, 7:20 AM
Unknown Object (File)
Sat, Nov 9, 6:53 AM
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.