HomeFreeBSD

Speed up vm_page_array initialization.

Description

Speed up vm_page_array initialization.

We currently initialize the vm_page array in three passes: one to zero
the array, one to initialize the "order" field of each page (necessary
when inserting them into the vm_phys buddy allocator one-by-one), and
one to initialize the remaining non-zero fields and individually insert
each page into the allocator.

Merge the three passes into one following a suggestion from alc:
initialize vm_page fields in a single pass, and use vm_phys_free_contig()
to efficiently insert physical memory segments into the buddy allocator.
This reduces the initialization time to a third or a quarter of what it
was before on most systems that I tested.

Reviewed by: alc, kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D12248

Details

Provenance
markjAuthored on
Reviewer
alc
Differential Revision
D12248: Speed up vm_page_array initialization.
Parents
rS323289: x86 MCA: Helpfully, print why ECC thresholding is not enabled on AMD
Branches
Unknown
Tags
Unknown