summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_contig.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-07-20 06:11:16 +0000
committeralc <alc@FreeBSD.org>2002-07-20 06:11:16 +0000
commit478ee061bb7923d81062185f068829ef907e98dd (patch)
treee9f50ed0e60727fb3ddee69531e9f28cd8d21e8e /sys/vm/vm_contig.c
parent9b15115842b50e54810b13bd8aa06bc30ac43602 (diff)
downloadFreeBSD-src-478ee061bb7923d81062185f068829ef907e98dd.zip
FreeBSD-src-478ee061bb7923d81062185f068829ef907e98dd.tar.gz
o Lock page queue accesses by vm_page_cache() in vm_contig_launder().
o Micro-optimize the control flow in vm_contig_launder().
Diffstat (limited to 'sys/vm/vm_contig.c')
-rw-r--r--sys/vm/vm_contig.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_contig.c b/sys/vm/vm_contig.c
index 722ece3..14c4dc2 100644
--- a/sys/vm/vm_contig.c
+++ b/sys/vm/vm_contig.c
@@ -111,9 +111,11 @@ vm_contig_launder(int queue)
vm_pageout_flush(&m_tmp, 1, 0);
return (TRUE);
}
- }
- if ((m->dirty == 0) && (m->busy == 0) && (m->hold_count == 0))
+ } else if (m->busy == 0 && m->hold_count == 0) {
+ vm_page_lock_queues();
vm_page_cache(m);
+ vm_page_unlock_queues();
+ }
}
return (FALSE);
}
OpenPOWER on IntegriCloud