Re: hub does disconnect when resuming

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Sat, 3 Feb 2007, Oliver Neukum wrote:

> Am Samstag, 3. Februar 2007 23:02 schrieb Alan Stern:
> > Obviously we can't afford to use a single dedicated buffer like this.  
> > Each thread reading a hub's port status will have to provide its own
> > buffer, or more simply, we will have to allocate a buffer dynamically for
> > every read instead of using a single static buffer.  I don't like the 
> > overhead of all those kmalloc and kfree calls for a 4-byte buffer, but the 
> > simplicity is very attractive.
> > 
> > What do you think is the best way to solve this?
> 
> If you want simplicity, I'd suggest serialization. kmalloc for 4 bytes
> is overkill. I think it is even faster if we block on the cases there's
> a collision that go through kmalloc/kfree each time.

That makes sense.  A single mutex would do the job.  I'll post a patch 
later on.

Alan Stern


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
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.