svn commit: r326055 - head/sys/vm
Mark Johnston
markj at FreeBSD.org
Tue Nov 21 13:17:41 UTC 2017
Author: markj
Date: Tue Nov 21 13:17:40 2017
New Revision: 326055
URL: https://svnweb.freebsd.org/changeset/base/326055
Log:
Allow for fictitious physical pages in vm_page_scan_contig().
Some drm2 drivers will set PG_FICTITIOUS in physical pages in order to
satisfy the OBJT_MGTDEVICE object interface, so a scan may encounter
fictitous pages. For now, allow for this possibility; such pages will be
skipped later in the scan since they are wired.
Reported by: avg
Reviewed by: kib
MFC after: 1 week
Modified:
head/sys/vm/vm_page.c
Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c Tue Nov 21 10:19:33 2017 (r326054)
+++ head/sys/vm/vm_page.c Tue Nov 21 13:17:40 2017 (r326055)
@@ -2065,8 +2065,10 @@ vm_page_scan_contig(u_long npages, vm_page_t m_start,
run_len = 0;
m_mtx = NULL;
for (m = m_start; m < m_end && run_len < npages; m += m_inc) {
- KASSERT((m->flags & (PG_FICTITIOUS | PG_MARKER)) == 0,
- ("page %p is PG_FICTITIOUS or PG_MARKER", m));
+ KASSERT((m->flags & PG_MARKER) == 0,
+ ("page %p is PG_MARKER", m));
+ KASSERT((m->flags & PG_FICTITIOUS) == 0 || m->wire_count == 1,
+ ("fictitious page %p has invalid wire count", m));
/*
* If the current page would be the start of a run, check its
More information about the svn-src-all
mailing list