Date: Sat, 21 Apr 2012 18:26:16 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r234554 - head/sys/vm Message-ID: <201204211826.q3LIQGEn099635@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Sat Apr 21 18:26:16 2012 New Revision: 234554 URL: http://svn.freebsd.org/changeset/base/234554 Log: As documented in vm_page.h, updates to the vm_page's flags no longer require the page queues lock. MFC after: 1 week Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sat Apr 21 18:14:46 2012 (r234553) +++ head/sys/vm/vm_page.c Sat Apr 21 18:26:16 2012 (r234554) @@ -2155,13 +2155,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 @@ -2201,8 +2198,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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204211826.q3LIQGEn099635>