From owner-freebsd-current@FreeBSD.ORG Tue Oct 21 14:50:33 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 89D9416A4B3; Tue, 21 Oct 2003 14:50:33 -0700 (PDT) Received: from beppo.feral.com (beppo.feral.com [192.67.166.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDD1443FB1; Tue, 21 Oct 2003 14:50:32 -0700 (PDT) (envelope-from mjacob@feral.com) Received: from win2k (float35.in0.lcl [172.16.166.35]) by beppo.feral.com (8.12.9p1/8.12.9) with ESMTP id h9LLoWSn005248; Tue, 21 Oct 2003 14:50:32 -0700 (PDT) (envelope-from mjacob@feral.com) From: "Matthew Jacob" To: "'Poul-Henning Kamp'" Date: Tue, 21 Oct 2003 14:42:56 -0700 Organization: Feral Software Message-ID: <000001c3981c$49fc17b0$23a610ac@win2k> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: <13910.1066772731@critter.freebsd.dk> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: alpha@freebsd.org cc: current@freebsd.org cc: 'Kris Kennaway' Subject: RE: Sleeping on "isp_mboxwaiting" with the following non-sleepablelocks held: X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: mjacob@feral.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2003 21:50:33 -0000 Well, I don't agree with the design here, but it is what it is. I'll make the change that you've added a requirement for. -----Original Message----- From: Poul-Henning Kamp [mailto:phk@phk.freebsd.dk] Sent: Tuesday, October 21, 2003 2:46 PM To: mjacob@feral.com Cc: 'Kris Kennaway'; alpha@freebsd.org; current@freebsd.org Subject: Re: Sleeping on "isp_mboxwaiting" with the following non-sleepablelocks held: In message <000801c3981a$8abc6540$23a610ac@win2k>, "Matthew Jacob" writes: >So? How about some details and context? > >I thought was told that being able to use locks in HBAs is fine. I had >them on for a while, and then had them off. I turned them on again over >a month ago. I'm somewhat surprised to see that a problem shows up now. > >*I* do the right thing with locks, IMO. I hold them in my module when I >enter and release them if/when I leave. Seeing a lock held by some >random caller causing me to blow up to me seems to be a hole in the >architecture, but I'd be the first to admit that I hardly am up to date >on what the rules of the road are now so such an opinion is >ill-informed. The lock held in this case, is not "some random caller", that is a mutex held specifically to expose device drivers which try to sleep in their ->strategy() function. You cannot sleep in the strategy() function because that would hold op I/O, and therefore likely lead to deadlock. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.