From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 27 19:03:05 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DBAD016A403 for ; Fri, 27 Apr 2007 19:03:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id 3F45A13C455 for ; Fri, 27 Apr 2007 19:03:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l3RJ2wST086294; Fri, 27 Apr 2007 15:02:58 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 27 Apr 2007 11:49:41 -0400 User-Agent: KMail/1.9.6 References: <200704262136.33196.hselasky@c2i.net> In-Reply-To: <200704262136.33196.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704271149.42325.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 27 Apr 2007 15:02:58 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3172/Fri Apr 27 10:49:40 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.2 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00, DATE_IN_PAST_03_06 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Hans Petter Selasky Subject: Re: msleep() on recursivly locked mutexes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2007 19:03:05 -0000 On Thursday 26 April 2007 03:36:33 pm Hans Petter Selasky wrote: > Are there any comments on integrating this functionality into msleep(), and > adding mtx_drop_recurse() and mtx_pickup_recurse() to the FreeBSD kernel? Nope. Fix the code to not recurse instead, or to know it has a recursed mutex and make sure it doesn't call mtx_sleep() or cv_wait() with a recursed lock. It's not that hard to do. The rest of the kernel manages that restriction fine. -- John Baldwin