Author: alc
Date: Sun Oct  8 16:54:42 2017
New Revision: 324411
URL: https://svnweb.freebsd.org/changeset/base/324411

Log:
  Replace an unnecessary call to vm_page_activate() by an assertion that
  the page is already wired or queued.  Prior to the elimination of PG_CACHED
  pages, vm_page_grab() might have returned a valid, previously PG_CACHED
  page, in which case enqueueing the page was necessary.  Now, that can't
  happen.  Moreover, activating the page is a dubious choice, since the page
  is not being accessed.
  
  Reviewed by:  kib
  MFC after:    1 week

Modified:
  head/sys/vm/swap_pager.c

Modified: head/sys/vm/swap_pager.c
==============================================================================
--- head/sys/vm/swap_pager.c    Sun Oct  8 08:02:26 2017        (r324410)
+++ head/sys/vm/swap_pager.c    Sun Oct  8 16:54:42 2017        (r324411)
@@ -1635,9 +1635,12 @@ swp_pager_force_pagein(vm_object_t object, vm_pindex_t
        if (m->valid == VM_PAGE_BITS_ALL) {
                vm_object_pip_wakeup(object);
                vm_page_dirty(m);
+#ifdef INVARIANTS
                vm_page_lock(m);
-               vm_page_activate(m);
+               if (m->wire_count == 0 && m->queue == PQ_NONE)
+                       panic("page %p is neither wired nor queued", m);
                vm_page_unlock(m);
+#endif
                vm_page_xunbusy(m);
                vm_pager_page_unswapped(m);
                return;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to