From owner-freebsd-hackers Fri Mar 9 15:29:36 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from aslan.scsiguy.com (aslan.scsiguy.com [63.229.232.106]) by hub.freebsd.org (Postfix) with ESMTP id AF29D37B71B; Fri, 9 Mar 2001 15:29:31 -0800 (PST) (envelope-from gibbs@scsiguy.com) Received: from scsiguy.com (localhost [127.0.0.1]) by aslan.scsiguy.com (8.11.2/8.9.3) with ESMTP id f29NSkO61063; Fri, 9 Mar 2001 16:28:53 -0700 (MST) (envelope-from gibbs@scsiguy.com) Message-Id: <200103092328.f29NSkO61063@aslan.scsiguy.com> To: =?ISO-8859-1?Q?G=E9rard_Roudier?= Cc: Mike Smith , Joe Albowicz , freebsd-hackers@FreeBSD.ORG Subject: Re: aic7xxx driver & SCBs In-Reply-To: Your message of "Fri, 09 Mar 2001 21:47:45 +0100." Date: Fri, 09 Mar 2001 16:28:46 -0700 From: "Justin T. Gibbs" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > >On Fri, 9 Mar 2001, Mike Smith wrote: > >> Joe; it looks like you have some funny ideas about something that's not >> actually very relevant. I assume that you have already gone and bought >> Monster Cable(tm) SCSI cables, and that you have the special >> oxygen-free-copper SCSI controller PCBs, because none of this is going to >> mean anything unless you have. > >Pardon and sorry, Mike. It is rather your reply that looks funny to me. Okay. Everyone take a big breath. My rule of thumb for email is, if you can't reply kindly to someone's question, you shouldn't reply at all. Sometimes I fall shy of that mark too, but I think its a worthy goal for everyone participating on our lists. So, Mike, try to play nice. Okay? As to the original question... SCSI Control Blocks (SCBs) are the controller resources used by the aic7xxx driver to deliver commands. You need to have one SCB for every outstanding transaction the card handles. All cards supported by either Linux or FreeBSD allocate a total of 253 SCBs. This number is *not* configurable on either OS (assuming you are using my driver). One thing that confuses people is the number of SCBs that can be concurrently stored on chip, varies with from chip to chip and sometimes with how the chip is integrated on the MB or HBA. The more hardware SCBs, the better the performance, but due to an SCB paging scheme, the total number of oustanding transactions all controllers support is 253. If you are curious, the driver probe message indicates the number of hardware SCBs and the total number of transactions, like so: aic7899: Wide Channel A, SCSI Id=7, 32/255 SCBs hardware SCBS ==^ ^== total number 2 of the 255 SCBs are reserved for various things hence the actual number of transactions being 253, not 255. If only one nubmer is printed, the hardware and total are equal. The Linux driver allows you to specify the number of transactions that can be queued to any given device on the bus. The default, again if your are using my driver, is to allow up to 253, the maximum the controller supports. The driver will automatically throttle this number based on the capabilities of the individual device. In the FreeBSD environment, this throttling occurs in the SCSI layer, not the controller. So, how many transactions should you allow? To some extent that depends on your workload. For non-sequential I/O (in my opinion the most common scenario), the more tags the merrier. This is why both the Linux and FreeBSD environments default to the maximum number of tags. Some devices, due to limited processing power on the drive or poor firmware engineering do show reduced sequential performance when put under a high tag load. If you know you are only going to do sequential I/O *and* you have the time to experiment with the results, your application might benefit from reducing the number of tags allowed. If you want to change these parameters under FreeBSD, read the camcontrol manpage about the "tags" option. Under linux, as you already know, play with the settings via "make *config". -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message