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)
Fri, Apr 12, 5:37 AM
Unknown Object (File)
Mar 19 2024, 3:26 PM
Unknown Object (File)
Mar 19 2024, 3:19 PM
Unknown Object (File)
Dec 20 2023, 1:32 AM
Unknown Object (File)
Nov 9 2023, 7:06 PM
Unknown Object (File)
Oct 8 2023, 5:58 PM
Unknown Object (File)
Oct 7 2023, 9:15 AM
Unknown Object (File)
Sep 16 2023, 8:43 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 21978

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

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.