Date: Tue, 23 Aug 2005 03:44:06 +0000 (UTC) From: Don Lewis <truckman@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern vfs_subr.c Message-ID: <200508230344.j7N3i6EF093968@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
truckman 2005-08-23 03:44:06 UTC FreeBSD src repository Modified files: sys/kern vfs_subr.c Log: Back out the removal of LK_NOWAIT from the VOP_LOCK() call in vlrureclaim() in vfs_subr.c 1.636 because waiting for the vnode lock aggravates an existing race condition. It is also undesirable according to the commit log for 1.631. Fix the tiny race condition that remains by rechecking the vnode state after grabbing the vnode lock and grabbing the vnode interlock. Fix the problem of other threads being starved (which 1.636 attempted to fix by removing LK_NOWAIT) by calling uio_yield() periodically in vlrureclaim(). This should be more deterministic than hoping that VOP_LOCK() without LK_NOWAIT will block, which may not happen in this loop. Reviewed by: kan MFC after: 5 days Revision Changes Path 1.642 +37 -7 src/sys/kern/vfs_subr.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508230344.j7N3i6EF093968>