• Alan Cox's avatar
    Add a page size field to struct vm_page. Increase the page size field when · dd05fa19
    Alan Cox authored
    a partially populated reservation becomes fully populated, and decrease this
    field when a fully populated reservation becomes partially populated.
    Use this field to simplify the implementation of pmap_enter_object() on
    amd64, arm, and i386.
    On all architectures where we support superpages, the cost of creating a
    superpage mapping is roughly the same as creating a base page mapping.  For
    example, both kinds of mappings entail the creation of a single PTE and PV
    entry.  With this in mind, use the page size field to make the
    implementation of vm_map_pmap_enter(..., MAP_PREFAULT_PARTIAL) a little
    smarter.  Previously, if MAP_PREFAULT_PARTIAL was specified to
    vm_map_pmap_enter(), that function would only map base pages.  Now, it will
    create up to 96 base page or superpage mappings.
    Reviewed by:	kib
    Sponsored by:	EMC / Isilon Storage Division