From owner-freebsd-current@FreeBSD.ORG Mon Jun 12 13:10:02 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C24F016A418; Mon, 12 Jun 2006 13:10:02 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAB9843D5E; Mon, 12 Jun 2006 13:09:58 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.6/8.13.3) with ESMTP id k5CD9qOM094624 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 12 Jun 2006 15:09:52 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.6/8.13.3/Submit) id k5CD9qiC094623; Mon, 12 Jun 2006 15:09:52 +0200 (CEST) Date: Mon, 12 Jun 2006 15:09:52 +0200 From: Divacky Roman To: Poul-Henning Kamp Message-ID: <20060612130952.GA94370@stud.fit.vutbr.cz> References: <20060612080504.W26634@fledge.watson.org> <34100.1150098013@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <34100.1150098013@critter.freebsd.dk> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: Robert Watson , current@freebsd.org, Kris Kennaway Subject: Re: FILEDESC_LOCK() implementation X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jun 2006 13:10:02 -0000 On Mon, Jun 12, 2006 at 07:40:13AM +0000, Poul-Henning Kamp wrote: > In message <20060612080504.W26634@fledge.watson.org>, Robert Watson writes: > > >At least in the VFS and socket code, you want a notion of acquiring both and > >dropping one, or upgrading/downgrading. The logic tends to go something like > >this: > > That's different from what FILEDESC needs. FILEDESC has two different > classes of operations: cheap/non-sleeping and expensive/sleeping I made a patch: http://hysteria.sk/~neologism/filedesc.patch which improves the situation on UP, it was even commited but then backed out because there are places where FILEDESC_[UN]LOC_FAST is used to protect operations which can sleep... I think there's just one or two such places but dont have time to work on this (I am busy with SoC) but is shoudl be quite trivial to find them (the number of places where we use _FAST locking is not very big) roman