From owner-cvs-all@FreeBSD.ORG Fri Aug 25 05:47:51 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C987216A4DE; Fri, 25 Aug 2006 05:47:51 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 804C743D49; Fri, 25 Aug 2006 05:47:51 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id F26C846DED; Fri, 25 Aug 2006 01:47:50 -0400 (EDT) Date: Fri, 25 Aug 2006 06:47:50 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Julian Elischer In-Reply-To: <44EE0906.40705@elischer.org> Message-ID: <20060825064512.D38856@fledge.watson.org> References: <200608241016.k7OAG1VE058083@repoman.freebsd.org> <44EE0906.40705@elischer.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Konstantin Belousov , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/share/man/man9 lock.9 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Aug 2006 05:47:51 -0000 On Thu, 24 Aug 2006, Julian Elischer wrote: > Konstantin Belousov wrote: > >> kib 2006-08-24 10:16:01 UTC >> >> FreeBSD src repository >> >> Modified files: (Branch: RELENG_6) >> share/man/man9 lock.9 Log: >> MFC rev.1.14: >> Note that LK_UPGRADE may drop the shared lock before taking the >> exclusive one. >> > excuse my ignorance but I though that the whole aim of an upgrade was to > make sure that you did NOT drop it before getting the exclusive lock..( or > it fails and you back out and retry) This is a feature and a bug. :-) In order to avoid deadlock on upgrade, one of two things must happen: - The upgrade must be able to fail -- i.e., sx(9)'s sx_try_upgrade(). - A race must be introduced in which the shared lock is released before an exclusive lock is acquired -- i.e., lockmgr(9)'s LK_UPGRADE. Consumers of lockmgr(9) -- specifically, VFS, are aware of this. Documenting it is good, however. :-) Robert N M Watson Computer Laboratory University of Cambridge