svn commit: r234764 - in stable/9/sys: i386/conf kern vm
Alan Cox
alc at FreeBSD.org
Sat Apr 28 17:54:55 UTC 2012
Author: alc
Date: Sat Apr 28 17:54:54 2012
New Revision: 234764
URL: http://svn.freebsd.org/changeset/base/234764
Log:
MFC r234554
Updates to the vm_page's flags no longer require the page queues lock.
Modified:
stable/9/sys/vm/vm_page.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/amd64/include/xen/ (props changed)
stable/9/sys/boot/ (props changed)
stable/9/sys/boot/i386/efi/ (props changed)
stable/9/sys/boot/ia64/efi/ (props changed)
stable/9/sys/boot/ia64/ski/ (props changed)
stable/9/sys/boot/powerpc/boot1.chrp/ (props changed)
stable/9/sys/boot/powerpc/ofw/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
stable/9/sys/conf/ (props changed)
stable/9/sys/contrib/dev/acpica/ (props changed)
stable/9/sys/contrib/octeon-sdk/ (props changed)
stable/9/sys/contrib/pf/ (props changed)
stable/9/sys/contrib/x86emu/ (props changed)
stable/9/sys/fs/ (props changed)
stable/9/sys/fs/ntfs/ (props changed)
stable/9/sys/i386/conf/XENHVM (props changed)
stable/9/sys/kern/subr_witness.c (props changed)
Modified: stable/9/sys/vm/vm_page.c
==============================================================================
--- stable/9/sys/vm/vm_page.c Sat Apr 28 17:29:08 2012 (r234763)
+++ stable/9/sys/vm/vm_page.c Sat Apr 28 17:54:54 2012 (r234764)
@@ -1921,13 +1921,10 @@ vm_page_unwire(vm_page_t m, int activate
if ((m->oflags & VPO_UNMANAGED) != 0 ||
m->object == NULL)
return;
- vm_page_lock_queues();
- if (activate)
- vm_page_enqueue(PQ_ACTIVE, m);
- else {
+ if (!activate)
m->flags &= ~PG_WINATCFLS;
- vm_page_enqueue(PQ_INACTIVE, m);
- }
+ vm_page_lock_queues();
+ vm_page_enqueue(activate ? PQ_ACTIVE : PQ_INACTIVE, m);
vm_page_unlock_queues();
}
} else
@@ -1967,8 +1964,8 @@ _vm_page_deactivate(vm_page_t m, int ath
if ((queue = m->queue) == PQ_INACTIVE)
return;
if (m->wire_count == 0 && (m->oflags & VPO_UNMANAGED) == 0) {
- vm_page_lock_queues();
m->flags &= ~PG_WINATCFLS;
+ vm_page_lock_queues();
if (queue != PQ_NONE)
vm_page_queue_remove(queue, m);
if (athead)
More information about the svn-src-stable-9
mailing list