From owner-freebsd-scsi@FreeBSD.ORG Fri Jan 5 18:24:46 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2A2EE16A417; Fri, 5 Jan 2007 18:24:46 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id E01A813C442; Fri, 5 Jan 2007 18:24:45 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id l05IOdMW067627; Fri, 5 Jan 2007 11:24:44 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <459E97E6.4000603@samsco.org> Date: Fri, 05 Jan 2007 11:24:38 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20061227 SeaMonkey/1.1 MIME-Version: 1.0 To: mjacob@freebsd.org References: <20070104225519.Q92958@ns1.feral.com> <459E8AE7.90104@samsco.org> <20070105093930.Y34456@ns1.feral.com> In-Reply-To: <20070105093930.Y34456@ns1.feral.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Fri, 05 Jan 2007 11:24:44 -0700 (MST) X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: freebsd-scsi@freebsd.org Subject: Re: CAM rescanner thread? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2007 18:24:46 -0000 mjacob@freebsd.org wrote: > > > On Fri, 5 Jan 2007, Scott Long wrote: > >> mjacob@freebsd.org wrote: >>> >>> Opinions? Seems to do what *I* want for automatically attaching >>> devices for mpt or isp when they appear on the fabric. All you have >>> to do is >>> alloc a ccb && a path and call xpt_rescan. >> >> Why do you need a separate thread for this? Many other drivers >> already handle this just fine. > > In CAM? > > I did try doing it without a thread and had all sorts of problems that > led to panics. I suppose I could try and fix that, but it's also true > that notification that things have changed is almost certainly on an > ithread and that the begin of a scan starts a heck of a lot of work > before returning. > > D'ya think it's that crucial other than just another proc slot? > > -matt > Ok, I see what you're saying. What I think needs to ultimately happen is for the entire probe code to go into a thread. I've tried this a couple of times, but have been caught up in trying to separate out the SPI and non-SPI bits of it. Your patch is looks to be a good start at the more simple approach. Scott