HomeFreeBSD

Introduce a new mechanism for relocating pages to a different physical

Description

Introduce a new mechanism for relocating pages to a different physical
address and use this mechanism when:

  1. kmem_alloc_{attr,contig}() can't suitable free pages in the buddy allocator's free page lists. This replaces the long-standing approach of laundering inactive and active pages, converting them into PG_CACHED pages, until there are sufficient cache/free pages to satisfy the allocation request.
  1. on a 32-bit MIPS processor there are no free pages within the limited coverage of the direct map region.

Make vm_phys_alloc_contig() a little smarter (and more efficient in some
cases). Specifically, use vm_phys_segs[] to avoid scanning free pages
lists that can't possibly contain suitable pages.

Note: vm_page_cache(), et al. are now dead code on this branch.

Reviewed by: kib, markj
Glanced at: jhb
Discussed with: jeff
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4444