Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Mar 2001 16:28:46 -0700
From:      "Justin T. Gibbs" <gibbs@scsiguy.com>
To:        =?ISO-8859-1?Q?G=E9rard_Roudier?= <groudier@club-internet.fr>
Cc:        Mike Smith <msmith@FreeBSD.ORG>, Joe Albowicz <joe@CS.UCLA.EDU>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: aic7xxx driver & SCBs 
Message-ID:  <200103092328.f29NSkO61063@aslan.scsiguy.com>
In-Reply-To: Your message of "Fri, 09 Mar 2001 21:47:45 %2B0100." <Pine.LNX.4.10.10103092108400.1731-100000@linux.local> 

next in thread | previous in thread | raw e-mail | index | archive | help
>
>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103092328.f29NSkO61063>