Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jul 2007 06:56:37 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/vm vm_pageout.c
Message-ID:  <200707020656.l626ubTf073365@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
alc         2007-07-02 06:56:37 UTC

  FreeBSD src repository

  Modified files:
    sys/vm               vm_pageout.c 
  Log:
  In the previous revision, when I replaced the unconditional acquisition
  of Giant in vm_pageout_scan() with VFS_LOCK_GIANT(), I had to eliminate
  the acquisition of the vnode interlock before releasing the vm object's
  lock because the vnode interlock cannot be held when VFS_LOCK_GIANT() is
  performed.  Unfortunately, this allows the vnode to be recycled between
  the release of the vm object's lock and the vget() on the vnode.
  
  In this revision, I prevent the vnode from being recycled by acquiring
  another reference to the vm object and underlying vnode before releasing
  the vm object's lock.
  
  This change also addresses another preexisting but trivial problem.  By
  acquiring another reference to the vm object, I also prevent the vm
  object from being recycled.  Previously, the "vnodes skipped" counter
  could be wrong because if it examined a recycled vm object.
  
  Reported by:    kib
  Reviewed by:    kib
  Approved by:    re (kensmith)
  MFC after:      3 weeks
  
  Revision  Changes    Path
  1.289     +10 -11    src/sys/vm/vm_pageout.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707020656.l626ubTf073365>