git: kernel - Improve contiguous DMA memory allocation
Matthew Dillon
dillon at crater.dragonflybsd.org
Wed Dec 6 19:13:44 PST 2017
commit df47a6f0019ebd4d5fdeb0aa39aa217eff6097ef
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Wed Dec 6 19:09:20 2017 -0800
kernel - Improve contiguous DMA memory allocation
* vm_page_alloc_contig() will use vm_page_alloc() for degenerate
requests instead of the free page reserve. This case often
occurs when called from kmem_alloc_attr().
* vm_contig_pg_alloc() will scan the VM page queues first for
unrestricted memory requests, falling back to vm_page_alloc_contig()
if this fails.
vm_contig_pg_alloc() will call vm_page_alloc_contig() first if the
memory request has an address range restriction, falling back to
a VM page queue scan if it fails.
* This should hopefully reduce instances where device drivers probed
prior to e.g. NATA eat up all available low-memory DMA space,
leaving none for NATA (or other drivers) that might need low-memory
DMA space.
Summary of changes:
sys/vm/vm_contig.c | 31 ++++++++++++++++++++----
sys/vm/vm_kern.c | 3 ++-
sys/vm/vm_page.c | 70 +++++++++++++++++++++++++++++++++++-------------------
3 files changed, 74 insertions(+), 30 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/df47a6f0019ebd4d5fdeb0aa39aa217eff6097ef
--
DragonFly BSD source repository
More information about the Commits
mailing list