Page MenuHomeFreeBSD

libkvm: performance improvements for minidump read routines
AbandonedPublic

Authored by will on Jun 11 2016, 1:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 20 2024, 3:51 PM
Unknown Object (File)
Dec 22 2023, 4:53 PM
Unknown Object (File)
Dec 20 2023, 4:30 AM
Unknown Object (File)
Oct 31 2023, 6:44 AM
Unknown Object (File)
Oct 28 2023, 2:58 AM
Unknown Object (File)
Oct 27 2023, 11:36 PM
Unknown Object (File)
Sep 4 2023, 4:25 AM
Unknown Object (File)
May 31 2023, 9:30 AM
Subscribers

Details

Reviewers
jhb
Summary

libkvm: Move private kvm routines to kvm_private.c.

libkvm: Use mmap instead of pread.

libkvm: Bounds check (more) PTE indices.

libkvm: Improve physical address lookup scaling.

Instead of using a hash table to convert physical page addresses to offsets
in the sparse page array, cache the number of bits set for each 4MB chunk of
physical pages. Upon lookup, find the nearest cached population count, then
add/subtract the number of bits from that point to the page's PTE bit.
Then multiply by page size and add to the sparse page map's base offset.

This replaces O(n) worst-case lookup with O(1) (plus a small number of bits
to scan in the bitmap). Also, for a 128GB system, a typical kernel core of
about 8GB will now only require ~4.5MB of RAM for this approach instead of
~48MB as with the hash table.

Sponsored by: Backtrace I/O

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4178
Build 4221: arc lint + arc unit

Event Timeline

will retitled this revision from to libkvm: performance improvements for minidump read routines.
will updated this object.
will edited the test plan for this revision. (Show Details)

Committed last summer in several parts.