Re: patch to shift memory allocations to usb_alloc_urb()

Matthew Dharm <[email protected]>
Newsgroups gmane.linux.usb.devel
Organization One Eyed Alien Networks
Message-ID <[email protected]>
On Sun, Jul 01, 2007 at 11:00:43AM +0200, Oliver Neukum wrote:
> My goals are:
> 
> - guarantee the storage driver a fallback path without memory allocation

What about avoiding allocation of memory during a usb-storage transfer
completely?

Does anyone know if the SCSI core actually follows the sg_tablesize
parameter in the struct scsi_host_template ?  Right now, it's set to
SG_ALL, which means "unlimited number of sg elements", but any other
non-zero value is supposed to be the maximum number of segments that the
SCSI core sends to usb-storage.

If it does, then we could advertise some maximum sg list size in that.  We
could then use that same limit to pre-allocate all the URBs that
usb_sg_init would need.

Thus, we wouldn't need a fallback path without memory allocation.

Matt

-- 
Matthew Dharm                              Home: [email protected] 
Maintainer, Linux USB Mass Storage Driver

God, root, what is difference?
					-- Pitr
User Friendly, 11/11/1999

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGh4GpHL9iwnUZqnkRAo66AJ9e5wjiNTraHRpRI27CGXo3j7JVFQCcDDsg
ag4qn5P3XSp5YSr5ZgTqpdw=
=9rCq
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.