On Tue, 29 Apr 2014, Dan Williams wrote:

> > Another way to avoid the waste is to move the flags into the usb_hub
> > structure.
> >
> 
> I don't see how that avoids waste?  We need a long per flag.  In the
> struct usb_port we can combine status and requests in the same
> storage.

As it is, we have one long in each port structure.  With (say) an 
average of 4 ports per hub, that adds up to 4H longs, where H is the 
number of hubs.

If we move the flags into usb_hub, we will have two new longs in each
hub structure.  That adds up to 2H longs, only half as much as before.

If the average number of ports per hub is bigger, the advantage is 
greater.  If we have to add more atomic flags, the advantage will 
become smaller.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to