From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 25 14:12:15 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 463FA106567D; Fri, 25 Apr 2008 14:12:15 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id CE2518FC12; Fri, 25 Apr 2008 14:12:14 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id B4C36744021; Fri, 25 Apr 2008 17:12:13 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oTcVZOEbLMdm; Fri, 25 Apr 2008 17:12:13 +0300 (EEST) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [88.81.251.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id 3E48474400C; Fri, 25 Apr 2008 17:12:13 +0300 (EEST) Message-ID: <4811E6BC.4060306@icyb.net.ua> Date: Fri, 25 Apr 2008 17:12:12 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.12 (X11/20080311) MIME-Version: 1.0 To: Kostik Belousov References: <480E4269.2090604@icyb.net.ua> <480FBAB9.1000904@icyb.net.ua> <48103F36.6060707@icyb.net.ua> <200804240811.26183.jhb@freebsd.org> <4810FD1E.70602@icyb.net.ua> <20080425095009.GD18958@deviant.kiev.zoral.com.ua> In-Reply-To: <20080425095009.GD18958@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: devctl (alike?) for devfs 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, 25 Apr 2008 14:12:15 -0000 on 25/04/2008 12:50 Kostik Belousov said the following: > Did you run this with WITNESS ? > > You put the whole devctl_notify() call under the dev_mtx. This includes > the malloc(), PROC_LOCK() and signalling, and some internal devctl_queue() > stuff. This is wrong. Kostik, I tried this patch only with my working (non-debug) configuration. I will try with WITNESS. You think that acquiring all those locks while holding dev_mtx is bad? I can try to place devctl_notify calls in make_dev_credv, make_dev_alias and destroy_dev. The problem that I see is that destroy_devl ('l' at the end) calls itself recursively for child devices, this is all done under dev_mtx. So I am not sure how to call devctl_notify for those child devices properly. -- Andriy Gapon