From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 26 21:50:16 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 3365A16A406 for ; Thu, 26 Apr 2007 21:50:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id D1F8613C465 for ; Thu, 26 Apr 2007 21:50:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l3QLl4UA032598; Thu, 26 Apr 2007 15:47:05 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 26 Apr 2007 15:47:13 -0600 (MDT) Message-Id: <20070426.154713.-135506433.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200704262136.33196.hselasky@c2i.net> References: <200704262136.33196.hselasky@c2i.net> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 26 Apr 2007 15:47:05 -0600 (MDT) Cc: freebsd-hackers@freebsd.org 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: Thu, 26 Apr 2007 21:50:16 -0000 In message: <200704262136.33196.hselasky@c2i.net> Hans Petter Selasky writes: : Are there any comments on integrating this functionality into msleep(), and : adding mtx_drop_recurse() and mtx_pickup_recurse() to the FreeBSD kernel? This is generally a bad idea. We allow it for Giant because it has to be acquired everywhere and we have to drop it in some extremely ugly places. To enshrine this behavior for all mutexes strikes me as ill advised. Adding additional hacks to recursive mutexes seems wrong to my way of thinking. Warner