Re: [PATCH v8 08/18] usb: make usb_port flags atomic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux