Page MenuHomeFreeBSD

kboot: Parse memory usage
ClosedPublic

Authored by imp on Jan 29 2023, 3:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 16, 1:09 PM
Unknown Object (File)
Sun, Oct 13, 10:03 AM
Unknown Object (File)
Thu, Oct 10, 10:57 AM
Unknown Object (File)
Tue, Oct 8, 6:35 PM
Unknown Object (File)
Mon, Oct 7, 9:06 AM
Unknown Object (File)
Fri, Oct 4, 9:10 AM
Unknown Object (File)
Tue, Oct 1, 10:01 AM
Unknown Object (File)
Sun, Sep 29, 6:28 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 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.