Page MenuHomeFreeBSD

Fix pmap_is_prefaultable() on arm64 and riscv
ClosedPublic

Authored by alc on Dec 26 2021, 7:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 18, 11:00 AM
Unknown Object (File)
Tue, Apr 16, 2:03 PM
Unknown Object (File)
Mon, Apr 1, 6:53 AM
Unknown Object (File)
Dec 20 2023, 4:03 AM
Unknown Object (File)
Oct 24 2023, 10:18 AM
Unknown Object (File)
Sep 10 2023, 8:50 PM
Unknown Object (File)
May 27 2023, 10:15 AM
Unknown Object (File)
Feb 16 2023, 1:13 PM
Subscribers

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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable