Page MenuHomeFreeBSD

MI VM: Make it possible to set size of superpage at boot instead of compile time.
ClosedPublic

Authored by kib on Jan 16 2019, 6:26 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 5, 8:58 PM
Unknown Object (File)
Oct 23 2024, 6:17 AM
Unknown Object (File)
Oct 23 2024, 6:17 AM
Unknown Object (File)
Oct 23 2024, 6:16 AM
Unknown Object (File)
Oct 23 2024, 5:56 AM
Unknown Object (File)
Sep 29 2024, 4:32 PM
Unknown Object (File)
Sep 6 2024, 2:10 AM
Unknown Object (File)
Sep 5 2024, 7:07 PM
Subscribers

Details

Summary

In order to allow single kernel to use PAE pagetables on i386 if hardware supports it, and fall back to classic two-level paging structures if not, superpage code should be able to adopt to either 2M or 4M superpages size. There I make MI VM structures large enough to track the biggest possible superpage, by allowing architecture to define VM_NFREEORDER_MAX and VM_LEVEL_0_ORDER_MAX constants. Corresponding VM_NFREEORDER and VM_LEVEL_0_ORDER symbols can be defined as runtime values and must be less than the _MAX constants. If architecture does not define _MAXs, it is assumed that _MAX == normal constants.

Tested by: pho (as part of the large patch)

Diff Detail

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

Event Timeline

Do you plan to use PAE page tables even if there is less than 4GB of physical memory available?

sys/vm/vm_reserv.c
80 ↗(On Diff #52883)

Style nit: there should be no tab after #ifndef.

This revision is now accepted and ready to land.Jan 16 2019, 5:14 PM

Do you plan to use PAE page tables even if there is less than 4GB of physical memory available?

Yes, the main motivation for the change is nx bit. It may be worth to not use PAE if there is no nx support and the memory is < 4G, because page tables are smaller and there is no need to use cmpxchg8b for updates. I will look at it.

This revision was automatically updated to reflect the committed changes.