|
From: Stephan M. <ste...@we...> - 2006-06-13 17:18:48
Attachments:
huge_async_bulk.c
|
Libusb's kernel driver doesn't have any built-in limitations because it doesn't internally queue any data. It just allocates an URB for each userspace request and passes that URB down the stack. But it should be obvious that the host controller driver has to queue these request and that the size of this queue is limited since kernel=20 memory is a limited resource. I wrote a small test program (see attachment) to see how many requests Windows' USB stack can handle at once. And the limit on WinXP-SP2=20 (with 1GB of RAM) seems to be exactly 2500 URBs regardless of the URB's=20 data size. The maximum amount of data I was able to request at once with the test=20 program was 2500 URB each with 64kB of data. That's more than 150MB! This limit may depend on the host controller driver and the Windows versio= n. Stephan > Hi all, >=20 > I did some poking around on the web but have had a hard time finding an = answer=20 > to this question. Maybe someone here knows. >=20 > Is there a maximum number of URBs that can be submitted to an endpoint /= =20 > interface / device at any given time=3F For example, can I submit 1024 UR= Bs=20 > each with 16 KB data to a read endpoint or will I be restricted by the d= river=20 > stack, host controller, or something else=3F If there is such a restricti= on,=20 > does it apply to the device as a whole, just the interface, or just the=20 > endpoint=3F >=20 > Any insights would be much appreciated. >=20 > Best regards, > Gopal >=20 >=20 > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= Erweitern Sie FreeMail zu einem noch leistungsst=E4rkeren E-Mail-Postfach! =09 Mehr Infos unter http://freemail.web.de/home/landingpad/=3Fmc=3D021131 |
|
From: Stephan M. <ste...@we...> - 2006-06-15 08:20:59
|
Libusb's kernel driver limits the maximum data size to 64k for each URB although Windows' host controller drivers support larger sizes. See: http://support.microsoft.com/default.aspx=3Fscid=3Dkb;%5BLN%5D;832430 > Thank you Stephan. That information is useful. >=20 > One question though. I wasn't aware that the maximum URB size was 64 kB= in=20 > Windows. Is this true=3F In Linux I believe the maximum is 16384 (and on= ly=20 > with Kernel versions 2.6 and up). >=20 > Gopal >=20 >=20 > On Tuesday 13 June 2006 10:18, Stephan Meyer wrote: > > Libusb's kernel driver doesn't have any built-in limitations because > > it doesn't internally queue any data. It just allocates an URB for eac= h > > userspace request and passes that URB down the stack. > > > > But it should be obvious that the host controller driver has to queue > > these request and that the size of this queue is limited since kernel > > memory is a limited resource. > > > > I wrote a small test program (see attachment) to see how many requests= > > Windows' USB stack can handle at once. And the limit on WinXP-SP2 > > (with 1GB of RAM) seems to be exactly 2500 URBs regardless of the URB'= s > > data size. > > > > The maximum amount of data I was able to request at once with the test= > > program was 2500 URB each with 64kB of data. That's more than 150MB! > > > > This limit may depend on the host controller driver and the Windows > > version. > > > > > > Stephan > > > > > Hi all, > > > > > > I did some poking around on the web but have had a hard time finding= an > > > answer to this question. Maybe someone here knows. > > > > > > Is there a maximum number of URBs that can be submitted to an endpoi= nt / > > > interface / device at any given time=3F For example, can I submit 102= 4 > > > URBs each with 16 KB data to a read endpoint or will I be restricted= by > > > the driver stack, host controller, or something else=3F If there is s= uch a > > > restriction, does it apply to the device as a whole, just the interf= ace, > > > or just the endpoint=3F > > > > > > Any insights would be much appreciated. > > > > > > Best regards, > > > Gopal > > > > > > > > > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > > > Libusb-win32-devel mailing list > > > Lib...@li... > > > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > > > > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F > > Erweitern Sie FreeMail zu einem noch leistungsst=E4rkeren E-Mail-Postfac= h! > > Mehr Infos unter http://freemail.web.de/home/landingpad/=3Fmc=3D021131 >=20 >=20 > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club! =09 Jetzt gratis testen! http://freemail.web.de/home/landingpad/=3Fmc=3D021130 |
|
From: Gopal S. <go...@ne...> - 2006-06-14 21:47:26
|
Thank you Stephan. That information is useful. One question though. I wasn't aware that the maximum URB size was 64 kB in= =20 Windows. Is this true? In Linux I believe the maximum is 16384 (and only= =20 with Kernel versions 2.6 and up). Gopal On Tuesday 13 June 2006 10:18, Stephan Meyer wrote: > Libusb's kernel driver doesn't have any built-in limitations because > it doesn't internally queue any data. It just allocates an URB for each > userspace request and passes that URB down the stack. > > But it should be obvious that the host controller driver has to queue > these request and that the size of this queue is limited since kernel > memory is a limited resource. > > I wrote a small test program (see attachment) to see how many requests > Windows' USB stack can handle at once. And the limit on WinXP-SP2 > (with 1GB of RAM) seems to be exactly 2500 URBs regardless of the URB's > data size. > > The maximum amount of data I was able to request at once with the test > program was 2500 URB each with 64kB of data. That's more than 150MB! > > This limit may depend on the host controller driver and the Windows > version. > > > Stephan > > > Hi all, > > > > I did some poking around on the web but have had a hard time finding an > > answer to this question. Maybe someone here knows. > > > > Is there a maximum number of URBs that can be submitted to an endpoint / > > interface / device at any given time? For example, can I submit 1024 > > URBs each with 16 KB data to a read endpoint or will I be restricted by > > the driver stack, host controller, or something else? If there is such= a > > restriction, does it apply to the device as a whole, just the interface, > > or just the endpoint? > > > > Any insights would be much appreciated. > > > > Best regards, > > Gopal > > > > > > _______________________________________________ > > Libusb-win32-devel mailing list > > Lib...@li... > > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > > __________________________________________________________________________ > Erweitern Sie FreeMail zu einem noch leistungsst=E4rkeren E-Mail-Postfach! > Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=3D021131 |
|
From: Andrew X. <xi...@gr...> - 2006-06-19 05:31:36
|
I got the simple bulk write/read to work. However, I would like to have a thread waiting on the read all the time and process the read data independent of the write. How would I implement async read using the libusb? anyone has an example? thanks Andrew |