Page MenuHomeFreeBSD

Fix pmap_is_prefaultable() on arm64 and riscv
ClosedPublic

Authored by alc on Dec 26 2021, 7:37 AM.

Details

Summary

The current implementations never correctly return TRUE. In all cases, when they currently return TRUE, they should have returned FALSE. And, in some cases, when they currently return FALSE, they should have returned TRUE.

I will eliminate the included debug counters before committing.

Test Plan

Below are results from the included debug counters after completing a buildworld.

Before applying the proposed fix:

debug.counters.other3: 0
debug.counters.other2: 0
debug.counters.other1: 169158
debug.counters.valid: 11813622
debug.counters.success: 430023864

After applying the proposed fix:

debug.counters.other3: 0
debug.counters.other2: 0
debug.counters.other1: 0
debug.counters.valid: 375
debug.counters.success: 432598104

Here is how to interpret these results. Without the fix, there are approximately 12 million pointless calls to pmap_enter_quick(). The fix eliminates these calls. And, with the fix, the number of successful calls to pmap_enter_quick() increases by about 2.57 million. Finally, vmstat shows that these additional mappings eliminated about 1.84 million page faults.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped