Index: sys/amd64/amd64/pmap.c =================================================================== --- sys/amd64/amd64/pmap.c +++ sys/amd64/amd64/pmap.c @@ -3947,12 +3947,14 @@ while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { - pvh_gen = pvh->pv_gen; + if ((m->flags & PG_FICTITIOUS) == 0) + pvh_gen = pvh->pv_gen; md_gen = m->md.pv_gen; rw_wunlock(lock); PMAP_LOCK(pmap); rw_wlock(lock); - if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { + if (((m->flags & PG_FICTITIOUS) == 0 && + pvh_gen != pvh->pv_gen) || md_gen != m->md.pv_gen) { rw_wunlock(lock); PMAP_UNLOCK(pmap); goto retry; @@ -5775,13 +5777,14 @@ TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { - pvh_gen = pvh->pv_gen; + if ((m->flags & PG_FICTITIOUS) == 0) + pvh_gen = pvh->pv_gen; md_gen = m->md.pv_gen; rw_wunlock(lock); PMAP_LOCK(pmap); rw_wlock(lock); - if (pvh_gen != pvh->pv_gen || - md_gen != m->md.pv_gen) { + if (((m->flags & PG_FICTITIOUS) == 0 && + pvh_gen != pvh->pv_gen) || md_gen != m->md.pv_gen) { PMAP_UNLOCK(pmap); rw_wunlock(lock); goto retry_pv_loop; @@ -5985,12 +5988,14 @@ pvf = pv; pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { - pvh_gen = pvh->pv_gen; + if ((m->flags & PG_FICTITIOUS) == 0) + pvh_gen = pvh->pv_gen; md_gen = m->md.pv_gen; rw_wunlock(lock); PMAP_LOCK(pmap); rw_wlock(lock); - if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { + if (((m->flags & PG_FICTITIOUS) == 0 && + pvh_gen != pvh->pv_gen) || md_gen != m->md.pv_gen) { PMAP_UNLOCK(pmap); goto retry; } @@ -6248,11 +6253,13 @@ pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { md_gen = m->md.pv_gen; - pvh_gen = pvh->pv_gen; + if ((m->flags & PG_FICTITIOUS) == 0) + pvh_gen = pvh->pv_gen; rw_wunlock(lock); PMAP_LOCK(pmap); rw_wlock(lock); - if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { + if (((m->flags & PG_FICTITIOUS) == 0 && + pvh_gen != pvh->pv_gen) || md_gen != m->md.pv_gen) { PMAP_UNLOCK(pmap); goto restart; }