From 478ee061bb7923d81062185f068829ef907e98dd Mon Sep 17 00:00:00 2001 From: alc Date: Sat, 20 Jul 2002 06:11:16 +0000 Subject: o Lock page queue accesses by vm_page_cache() in vm_contig_launder(). o Micro-optimize the control flow in vm_contig_launder(). --- sys/vm/vm_contig.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/vm/vm_contig.c') 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); } -- cgit v1.1