Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Dec 2011 07:28:50 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r228256 - in stable/8/sys: amd64/amd64 i386/i386 i386/xen ia64/ia64 mips/mips
Message-ID:  <201112040728.pB47SoeR076012@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Sun Dec  4 07:28:50 2011
New Revision: 228256
URL: http://svn.freebsd.org/changeset/base/228256

Log:
  MFC r223732
    When iterating over a paging queue, explicitly check for PG_MARKER,
    instead of relying on zeroed memory being interpreted as an empty
    PV list.

Modified:
  stable/8/sys/amd64/amd64/pmap.c
  stable/8/sys/i386/i386/pmap.c
  stable/8/sys/i386/xen/pmap.c
  stable/8/sys/ia64/ia64/pmap.c
  stable/8/sys/mips/mips/pmap.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/amd64/amd64/pmap.c
==============================================================================
--- stable/8/sys/amd64/amd64/pmap.c	Sun Dec  4 07:18:54 2011	(r228255)
+++ stable/8/sys/amd64/amd64/pmap.c	Sun Dec  4 07:28:50 2011	(r228256)
@@ -2028,7 +2028,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: stable/8/sys/i386/i386/pmap.c
==============================================================================
--- stable/8/sys/i386/i386/pmap.c	Sun Dec  4 07:18:54 2011	(r228255)
+++ stable/8/sys/i386/i386/pmap.c	Sun Dec  4 07:28:50 2011	(r228256)
@@ -2166,7 +2166,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: stable/8/sys/i386/xen/pmap.c
==============================================================================
--- stable/8/sys/i386/xen/pmap.c	Sun Dec  4 07:18:54 2011	(r228255)
+++ stable/8/sys/i386/xen/pmap.c	Sun Dec  4 07:28:50 2011	(r228256)
@@ -2068,7 +2068,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: stable/8/sys/ia64/ia64/pmap.c
==============================================================================
--- stable/8/sys/ia64/ia64/pmap.c	Sun Dec  4 07:18:54 2011	(r228255)
+++ stable/8/sys/ia64/ia64/pmap.c	Sun Dec  4 07:28:50 2011	(r228256)
@@ -798,7 +798,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: stable/8/sys/mips/mips/pmap.c
==============================================================================
--- stable/8/sys/mips/mips/pmap.c	Sun Dec  4 07:18:54 2011	(r228255)
+++ stable/8/sys/mips/mips/pmap.c	Sun Dec  4 07:28:50 2011	(r228256)
@@ -1405,7 +1405,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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112040728.pB47SoeR076012>