From owner-cvs-src@FreeBSD.ORG Mon Dec 6 18:52:29 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0FACC16A4CE; Mon, 6 Dec 2004 18:52:29 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0E2943D64; Mon, 6 Dec 2004 18:52:28 +0000 (GMT) (envelope-from ps@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iB6IqSSo000127; Mon, 6 Dec 2004 18:52:28 GMT (envelope-from ps@repoman.freebsd.org) Received: (from ps@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iB6IqSGV000126; Mon, 6 Dec 2004 18:52:28 GMT (envelope-from ps) Message-Id: <200412061852.iB6IqSGV000126@repoman.freebsd.org> From: Paul Saab Date: Mon, 6 Dec 2004 18:52:28 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/nfsclient nfs_bio.c nfs_node.c nfs_vnops.c nfsnode.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Dec 2004 18:52:29 -0000 ps 2004-12-06 18:52:28 UTC FreeBSD src repository Modified files: sys/nfsclient nfs_bio.c nfs_node.c nfs_vnops.c nfsnode.h Log: Serialize NFS vinvalbuf operations by acquiring/upgrading to the vnode EXCLUSIVE lock. This prevents threads from adding pages to the vnode while an invalidation is in progress, closing potential races. In the bioread() path, callers acquire the SHARED vnode lock - so while an invalidate was in progress, it was possible to fault in new pages onto the vnode causing the invalidation to take a while or fail. We saw these races at Yahoo! with very large files+heavy concurrent access. Forcing an upgrade to EXCLUSIVE lock before doing the invalidation closes all these races. Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com Revision Changes Path 1.141 +23 -26 src/sys/nfsclient/nfs_bio.c 1.70 +1 -1 src/sys/nfsclient/nfs_node.c 1.235 +0 -2 src/sys/nfsclient/nfs_vnops.c 1.49 +0 -2 src/sys/nfsclient/nfsnode.h