Page MenuHomeFreeBSD

amd64 pmap: stop actively maintaning pages for minidump

Authored by mjg on Oct 6 2019, 3:49 AM.



pv chunks are kept on a global list, they can be iterated instead when needed.

Test Plan

Performed a minidump.

Diff Detail

rS FreeBSD src repository
Lint Skipped
Unit Tests Skipped
Build Status
Buildable 26892

Event Timeline

mjg created this revision.Oct 6 2019, 3:49 AM
kib added a comment.Oct 6 2019, 12:14 PM

Well, this relies on the pv chunks list consistency. In other words, if any CPU in the system modifies pv lru list, minidump would hang/crash.
More, you are locking the mutex, which is either nop or hangs as well.

mjg added a comment.EditedOct 6 2019, 2:15 PM

This can be modified to use CK_* macros which make it safe to traverse in face of modification performed at the same time.

Then this can only be a problem if the list gets corrupted and that's what we have to traverse. Should this be of concern, pv chunk can grow a 'magic' field to verify the next element is of the right type. I verified there is 16 bytes of unused space in there.

This still can run into loops, which again can be handled in at least two ways: either stop the traversal after n entries or maintain a global counter (per-cpu based).

No matter what though, there should be on reason to actively maintain the bitmap.

mjg abandoned this revision.Oct 8 2019, 12:54 PM

This struct should start getting cached, which will have a side effect of not wandering to the minidump array this often.