Page MenuHomeFreeBSD

amd64 pmap: stop actively maintaning pages for minidump
AbandonedPublic

Authored by mjg on Oct 6 2019, 3:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 3:34 AM
Unknown Object (File)
Nov 23 2023, 7:13 PM
Unknown Object (File)
Jun 13 2023, 10:42 AM
Unknown Object (File)
Nov 26 2022, 8:26 PM
Subscribers

Details

Reviewers
kib
markj
jeff
Summary

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

Test Plan

Performed a minidump.

Diff Detail

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

Event Timeline

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.

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.

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