From owner-freebsd-current@FreeBSD.ORG Tue Jul 3 18:01:52 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A6A116A421 for ; Tue, 3 Jul 2007 18:01:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay01.kiev.sovam.com (relay01.kiev.sovam.com [62.64.120.200]) by mx1.freebsd.org (Postfix) with ESMTP id 2111813C447 for ; Tue, 3 Jul 2007 18:01:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [89.162.146.170] (helo=skuns.kiev.zoral.com.ua) by relay01.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1I5mhB-000CU5-M0 for current@freebsd.org; Tue, 03 Jul 2007 21:01:50 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by skuns.kiev.zoral.com.ua (8.14.1/8.14.1) with ESMTP id l63I1alM039294 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 3 Jul 2007 21:01:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.1/8.14.1) with ESMTP id l63I1fBI029104 for ; Tue, 3 Jul 2007 21:01:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.1/8.14.1/Submit) id l63I1fpD029103 for current@freebsd.org; Tue, 3 Jul 2007 21:01:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 3 Jul 2007 21:01:41 +0300 From: Kostik Belousov To: current@freebsd.org Message-ID: <20070703180141.GJ2200@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+Hr//EUsa8//ouuB" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.90.2, clamav-milter version 0.90.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on skuns.kiev.zoral.com.ua X-Scanner-Signature: 7ffaa6bc246e67c9b1a22e0c753f4a43 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 1188 [July 03 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Method: none X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: Subject: HEADS UP: destroy_dev_sched() KPI in the tree 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: Tue, 03 Jul 2007 18:01:52 -0000 --+Hr//EUsa8//ouuB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Today, I got re@ permission and committed the destroy_dev_sched() KPI into the tree. As suggested by Nate Lawson, destroy_dev() tries to auto-detect "devdrn" deadlock condition and transforms destroy_dev() from d_close() csw method into destroy_dev_sched(). I together with Peter Holm tried to test the change as thoroughly as possible. The obvious problematic area are the races between device driver module unload and destroy_dev_sched(). At least smb(4) definitely has that race that shall be worked around by draining events with drain_dev_clone_events() and destroy_dev_drain(&cdevsw); see snp(4) change for example. Please, report issues caused by the patch to the list with me Cc:ed. Change of autodetection of deadlock in destroy_dev() was made in separate commit for ease of reverting. --+Hr//EUsa8//ouuB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGio8EC3+MBN1Mb4gRAnoCAJ0aQ1bXOYd1kI0YTWosXOyxU/3buwCffhUy l8BOIcnF1Fkmgct+8jFYOWw= =9AjK -----END PGP SIGNATURE----- --+Hr//EUsa8//ouuB--