Page MenuHomeFreeBSD

Improve superpage handling in pmap_advise()
ClosedPublic

Authored by alc on Jul 30 2019, 4:07 PM.
Tags
None
Referenced Files
F106441976: D21115.id60317.diff
Mon, Dec 30, 8:00 PM
Unknown Object (File)
Sun, Dec 29, 8:24 PM
Unknown Object (File)
Sun, Dec 29, 3:54 AM
Unknown Object (File)
Thu, Dec 12, 12:52 PM
Unknown Object (File)
Wed, Dec 11, 8:58 AM
Unknown Object (File)
Wed, Dec 4, 11:46 PM
Unknown Object (File)
Nov 1 2024, 2:02 PM
Unknown Object (File)
Oct 20 2024, 10:18 AM
Subscribers

Details

Summary

In pmap_advise(), when we encounter a superpage mapping, we first demote the mapping and then destroy one of the 4 KB page mappings so that there is a potential trigger for repromotion. Currently, we destroy the first 4 KB page mapping that falls within the (current) superpage mapping or the virtual address range {sva, eva). However, I have found empirically that destroying the last 4 KB mapping produces slightly better results, specifically, more promotions and fewer failed promotion attempts. Accordingly, this revision changes pmap_advise() to destroy the last 4 KB page mapping. It also replaces some nearby uses of boolean_t with bool.

Diff Detail

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

Event Timeline

amd64/amd64/pmap.c
7510 ↗(On Diff #60294)

Should this comment be amended to explain why we choose the last page in the range?

This revision is now accepted and ready to land.Jul 30 2019, 7:32 PM
amd64/amd64/pmap.c
7510 ↗(On Diff #60294)

Yes, I will do so this evening.