ATA rman performance enhancement

Sean McNeil sean at mcneil.com
Mon Jan 3 11:54:43 PST 2005


On Mon, 2005-01-03 at 20:40 +0100, Søren Schmidt wrote:
> Nate Lawson wrote:
> > While doing some benchmarking of other code, I noticed that there were a 
> > lot of calls to rman_get_bustag/handle().  They weren't taking up much 
> > actual time since they're pretty lightweight but seemed to be unnecessary.
> > 
> > I worked up the attached diff and benchmarked it.  There are about 1000 
> > calls a second to the rman routines without this patch and essentially 
> > none with it.  It makes about a 1% difference in throughput under some 
> > IO loads.  It is only for non-Promise or non-SII controllers right now 
> > since I didn't extend the initialization step to more than ata-pci.c. 
> > The same approach could be used for the other INW/OUTW calls as well but 
> > they're not in the fast path.  I think it may make more of a difference 
> > with small reads.
> > 
> > Feel free to test, cleanup, and commit.
> 
> I had something semilar to this once back when, but since HW got lots 
> faster I couldn't measure it anymore, but maybe things has changed...
> 
> Anyhow it needs to be applied to ata-isa.c ata-card.c ata-cbus.c etc to 
> not break anything at least. I'll think about it and eventually do 
> something about it in ATA-mkIII if it really is mesureable again..

I would suggest that it be done even if it isn't measurable.  If you do
not need to call a function all the time like that, then where is the
harm in doing it more efficiently?  The added memory storage for this is
more than made up by its usefulness.

Cheers,
Sean

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20050103/cff50acf/attachment.bin


More information about the freebsd-current mailing list