Page MenuHomeFreeBSD

Opportunistically update the page's dirty field in pmap_ts_referenced().
ClosedPublic

Authored by alc on Aug 31 2016, 4:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 3, 5:09 PM
Unknown Object (File)
Thu, Oct 3, 8:47 AM
Unknown Object (File)
Wed, Oct 2, 9:50 AM
Unknown Object (File)
Tue, Oct 1, 1:38 PM
Unknown Object (File)
Sep 28 2024, 1:39 AM
Unknown Object (File)
Sep 27 2024, 10:17 PM
Unknown Object (File)
Sep 22 2024, 7:31 PM
Unknown Object (File)
Sep 21 2024, 12:39 PM
Subscribers
None

Details

Summary

This change has us opportunistically updating the page's dirty field in pmap_ts_referenced(). I think that the comments explain the benefits.

This won't eliminate pmap_is_modified() calls when the page is not mapped for write access, but those cases are handled efficiently by pmap_is_modified() using the PGA_WRITEABLE flag. Only writeable pages that have not been written to will bear the full cost of pmap_is_modified().

This is a work in progress. I've only written the amd64 implementation as a demonstration.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

alc retitled this revision from to Opportunistically update the page's dirty field in pmap_ts_referenced()..
alc updated this object.
alc edited the test plan for this revision. (Show Details)
alc added reviewers: kib, markj.

Here is some data from the debug counters.

debug.counter_yes: 59075
debug.counter_no: 246172

These values come after 3 and a fraction iterations of a parallel "buildworld" on a machine configured with 3GB memory.

markj edited edge metadata.
markj added inline comments.
amd64/amd64/pmap.c
5901 โ†—(On Diff #19875)

Is there a reason these assignments are in the loop bodies rather than being lifted to the top of the function?

This revision is now accepted and ready to land.Aug 31 2016, 6:16 PM
alc marked an inline comment as done.Aug 31 2016, 6:25 PM
alc added inline comments.
amd64/amd64/pmap.c
5901 โ†—(On Diff #19875)

Yes, they could change from one pmap to the next. Specifically, on Intel processors, we could have both EPT and regular format page tables.

kib edited edge metadata.
alc marked 2 inline comments as done.Aug 31 2016, 9:50 PM

Since this is an optimization, I don't need to change the pmap implementations all at once, so I will likely commit this change in a few hours.

This revision was automatically updated to reflect the committed changes.