cvs commit: src/sys/vm vm_pageout.c
Alan Cox
alc at FreeBSD.org
Mon Jul 2 06:56:37 UTC 2007
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
More information about the cvs-src
mailing list