Re: [ANNOUNCE][RELEASE]: megaraid unified driver version 2.20.0.B1

From: Jeff Garzik
Date: Fri Apr 16 2004 - 14:20:04 EST


Mukker, Atul wrote:
megaraid_clib.c:
- why do you need the scb pool managment code at all? You can dynamically
allocate scbs in ->queuecommand

Will do. Please see the follow up question below

If there is a static maximum of scbs for megaraid hardware, dynamically allocating scbs in ->queuecommand is a waste of time.

In my drivers, I pre-allocate driver-specific per-request structures -- just like the SCSI layer does ;-)

If you follow this -- faster -- approach, make sure you don't waste a lot of memory with pre-allocated scb's you'll rarely use.


- can you explain the need for all the mraid_pci_blk_pool? I.e. why the
generic dma pool routines don't work for megaraid

We did not want to use pci_alloc_consistent because it would give one page
even if we need 16 bytes (and we need a lot of these). Also, the
pci_poo_create and pci_pool_alloc would fail on some setups - maybe because
the driver requires lots of small chunks of DMAable buffers. So we decided
to write wrapper functions over pci_alloc_consistent..

Would prefer to identify the root cause of pci_pool_xxx failure, since that is the proper API to use.

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/