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
F110467240: D33659.id100569.diff
Tue, Feb 18, 8:36 PM
Unknown Object (File)
Mon, Feb 17, 7:45 PM
Unknown Object (File)
Mon, Feb 17, 12:12 PM
Unknown Object (File)
Sat, Feb 8, 5:47 AM
Unknown Object (File)
Wed, Jan 22, 12:47 AM
Unknown Object (File)
Jan 15 2025, 11:54 AM
Unknown Object (File)
Dec 7 2024, 5:32 PM
Unknown Object (File)
Nov 30 2024, 12:17 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