svn commit: r223732 - in head/sys: amd64/amd64 i386/i386 i386/xen
ia64/ia64 mips/mips
Alan Cox
alc at FreeBSD.org
Sat Jul 2 23:42:05 UTC 2011
Author: alc
Date: Sat Jul 2 23:42:04 2011
New Revision: 223732
URL: http://svn.freebsd.org/changeset/base/223732
Log:
When iterating over a paging queue, explicitly check for PG_MARKER, instead
of relying on zeroed memory being interpreted as an empty PV list.
Reviewed by: kib
Modified:
head/sys/amd64/amd64/pmap.c
head/sys/i386/i386/pmap.c
head/sys/i386/xen/pmap.c
head/sys/ia64/ia64/pmap.c
head/sys/mips/mips/pmap.c
Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c Sat Jul 2 23:41:11 2011 (r223731)
+++ head/sys/amd64/amd64/pmap.c Sat Jul 2 23:42:04 2011 (r223732)
@@ -2104,7 +2104,7 @@ pmap_collect(pmap_t locked_pmap, struct
vm_page_t m, free;
TAILQ_FOREACH(m, &vpq->pl, pageq) {
- if (m->hold_count || m->busy)
+ if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy)
continue;
TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) {
va = pv->pv_va;
Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c Sat Jul 2 23:41:11 2011 (r223731)
+++ head/sys/i386/i386/pmap.c Sat Jul 2 23:42:04 2011 (r223732)
@@ -2188,7 +2188,7 @@ pmap_collect(pmap_t locked_pmap, struct
sched_pin();
TAILQ_FOREACH(m, &vpq->pl, pageq) {
- if (m->hold_count || m->busy)
+ if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy)
continue;
TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) {
va = pv->pv_va;
Modified: head/sys/i386/xen/pmap.c
==============================================================================
--- head/sys/i386/xen/pmap.c Sat Jul 2 23:41:11 2011 (r223731)
+++ head/sys/i386/xen/pmap.c Sat Jul 2 23:42:04 2011 (r223732)
@@ -2012,7 +2012,7 @@ pmap_collect(pmap_t locked_pmap, struct
sched_pin();
TAILQ_FOREACH(m, &vpq->pl, pageq) {
- if (m->hold_count || m->busy)
+ if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy)
continue;
TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) {
va = pv->pv_va;
Modified: head/sys/ia64/ia64/pmap.c
==============================================================================
--- head/sys/ia64/ia64/pmap.c Sat Jul 2 23:41:11 2011 (r223731)
+++ head/sys/ia64/ia64/pmap.c Sat Jul 2 23:42:04 2011 (r223732)
@@ -774,7 +774,7 @@ get_pv_entry(pmap_t locked_pmap)
vpq = &vm_page_queues[PQ_INACTIVE];
retry:
TAILQ_FOREACH(m, &vpq->pl, pageq) {
- if (m->hold_count || m->busy)
+ if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy)
continue;
TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) {
va = pv->pv_va;
Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c Sat Jul 2 23:41:11 2011 (r223731)
+++ head/sys/mips/mips/pmap.c Sat Jul 2 23:42:04 2011 (r223732)
@@ -1414,7 +1414,7 @@ get_pv_entry(pmap_t locked_pmap)
vpq = &vm_page_queues[PQ_INACTIVE];
retry:
TAILQ_FOREACH(m, &vpq->pl, pageq) {
- if (m->hold_count || m->busy)
+ if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy)
continue;
TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) {
va = pv->pv_va;
More information about the svn-src-head
mailing list