Page MenuHomeFreeBSD

kboot: Parse memory usage
ClosedPublic

Authored by imp on Jan 29 2023, 3:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 22, 10:38 AM
Unknown Object (File)
Sat, Jun 22, 10:21 AM
Unknown Object (File)
Sat, Jun 22, 10:09 AM
Unknown Object (File)
Sat, Jun 22, 8:58 AM
Unknown Object (File)
Sat, Jun 15, 1:32 PM
Unknown Object (File)
Sun, May 26, 12:45 AM
Unknown Object (File)
Sun, May 26, 12:45 AM
Unknown Object (File)
Sun, May 26, 12:45 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 49309
Build 46199: arc lint + arc unit

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 ↗(On Diff #116246)

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

74 ↗(On Diff #116246)

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.