From owner-freebsd-stable@FreeBSD.ORG Wed Aug 15 18:01:27 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A70EA16A419 for ; Wed, 15 Aug 2007 18:01:27 +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 3F5DF13C45B for ; Wed, 15 Aug 2007 18:01:27 +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.8/8.13.8) with ESMTP id l7FHnfGB010222; Wed, 15 Aug 2007 11:49:42 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <46C33CB2.7040204@samsco.org> Date: Wed, 15 Aug 2007 11:49:38 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: Artem Kuchin References: <000b01c7df5f$0ee4eec0$0c00a8c0@Artem> In-Reply-To: <000b01c7df5f$0ee4eec0$0c00a8c0@Artem> 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]); Wed, 15 Aug 2007 11:49:42 -0600 (MDT) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-stable@freebsd.org Subject: Re: twa is giant locked in 7-Current or everywhere? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2007 18:01:27 -0000 The TWA driver uses an INTR_FAST handler, meaning that it forgoes the traditional interrupt-thread model in FreeBSD. There are good and bad tradeoffs with doing that, and I'm always happy to discuss the topic in detail with those who are interested. In any case, most of the codepaths inside of the driver were still covered by Giant, just not the low-level interrupt handler. In 7-CURRENT, I changed the CAM (SCSI) layer API a bit, and the TWA driver was an unfortunate victim of the change. The easy fix was to revert the interrupt handler to being fully Giant-covered. There should be very little difference in actual performance unless the interrupt is being shared with another device. Even then the difference should be minor. Pushing the TWA source forward so that it is Giant-free would be an interesting task. Unfortunately, the existing code relies heavily on spin locks, while CAM requires that Giant-free drivers use sleep locks. Since this code is actively maintained by AMCC/3Ware, some amount of coordination would be needed with them to ensure the changes are accepted. Scott Artem Kuchin wrote: > Hi! > > When i installed twas driver on 6.2-STABLE it said > [FAST] > > i presumed that it measn that twa is giant-lock free. > > Now, after installing 7-CURRENT i see > > Aug 15 17:00:02 omni3 kernel: 3ware device driver for 9000 series > storage controllers, version: 3.70.03.007 > Aug 15 17:00:02 omni3 kernel: twa0: <3ware 9000 series Storage > Controller> port 0x3000-0x30ff mem > 0x88000000-0x89ffffff,0x8a200000-0x8a200fff irq 16 at devic > Aug 15 17:00:02 omni3 kernel: twa0: [GIANT-LOCKED] > Aug 15 17:00:02 omni3 kernel: twa0: [ITHREAD] > > > So, it says GIANT-LOCKED and then ITHREAD. > > Apparently, i have no real understaning what those words mean. > COuld anyone explain the meaning of > > FAST > ITHREAD > > Giant-locked is self explanatory and.. bad. > > Thank you. > > -- > Regards, > Artem > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"