From owner-svn-src-head@FreeBSD.ORG Fri May 22 13:54:34 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC7B5106566B; Fri, 22 May 2009 13:54:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 710D68FC20; Fri, 22 May 2009 13:54:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1M7VCe-000Cpy-Jg; Fri, 22 May 2009 16:54:30 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n4MDsBPv012143 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 22 May 2009 16:54:11 +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.3/8.14.3) with ESMTP id n4MDsB9o086071; Fri, 22 May 2009 16:54:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n4MDsBJj086070; Fri, 22 May 2009 16:54:11 +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: Fri, 22 May 2009 16:54:11 +0300 From: Kostik Belousov To: Scott Long Message-ID: <20090522135411.GB1927@deviant.kiev.zoral.com.ua> References: <3bbf2fe10905210629p46c7a204v6863aaba77354462@mail.gmail.com> <20090521194243.GW1927@deviant.kiev.zoral.com.ua> <3bbf2fe10905211511g53defb6cmac45fc2469cc64f@mail.gmail.com> <200905220921.34785.jhb@freebsd.org> <4A16AC32.2040507@samsco.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CQ3bIqlPgDWyQ28b" Content-Disposition: inline In-Reply-To: <4A16AC32.2040507@samsco.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.1 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1M7VCe-000Cpy-Jg 53b4b27f9e77009e71b9cd52127dfb35 X-Terabit: YES Cc: src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, Attilio Rao , rwatson@freebsd.org, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r192535 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2009 13:54:35 -0000 --CQ3bIqlPgDWyQ28b Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 22, 2009 at 07:44:18AM -0600, Scott Long wrote: > John Baldwin wrote: > >On Thursday 21 May 2009 6:11:02 pm Attilio Rao wrote: > >>At this point I wonder what's the purpose of maintaining the sleeping > >>version for such functions? > > > >Actually, I still very much do not like using M_NOWAIT needlessly. I=20 > >would much rather the solution for make_dev() be that the 1 or 2 places= =20 > >that need to do it with a mutex held instead queue a task to do the actu= al=20 > >make_dev() in a taskqueue when no locks are held. This is basically wha= t=20 > >destroy_dev_sched() is doing. Perhaps a make_dev_sched() with a similar= =20 > >callback to be called on completion would be better. Having a device=20 > >driver do all the work to setup the hardware only to fail to create a no= de=20 > >in /dev so that userland can actually use it is pretty rediculous and=20 > >useless. > > >=20 > It's a lot easier for me to handle a failure of make_dev in CAM than it= =20 > is to decouple the call to it. Please don't dictate policy. The second patch I posted yesterday allows to specify the flag that means "no sleep, could fail" to make_dev. Without the flag, make_dev behaves in the current fashion, i.e. sleep, cannot fail. Is this solution suitable for your needs ? --CQ3bIqlPgDWyQ28b Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkoWroMACgkQC3+MBN1Mb4igmACeKmtDEP4p6reGG/FXGNsluaNH ue0AnRgT0uBkgnJEs/CrpDyq88pS2olU =XyyQ -----END PGP SIGNATURE----- --CQ3bIqlPgDWyQ28b--