Re: another unusual flag for a really limited device

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Wed, 14 Nov 2007, Matthew Dharm wrote:

> > 1 won't work; max_sectors has to be at least the size of a memory
> > page.  This is enforced by the block layer's request_queue routines.
> > But we certainly could have a MAX_SECTORS_MIN flag.
> 
> So, for most systems, the limit is 8?

Yep.  And I guess 16 for 64-bit systems.

> Whatever our functional lower limit is, I think agree that a _MIN flag
> would make sense.
> 
> I'm somewhat tempted to actually just convert the _64 flag to a _MIN flag,
> and make the issue of finding an "optimal" value a userspace problem.  I
> think you can get to this parameter via sysfs, right?

In fact there are two separate sysfs interfaces for that parameter!  
One in usb-storage and one in the generic block queue code.  In theory 
we could remove ours, but it's already an established userspace API so 
we should hesitate before getting rid of it.

I'm not so sure about converting the _64 flag.  It's reasonable to 
think that a large number of devices will be limited to 64-KB 
transfers, both because of the 16-bit boundary and because of legacy 
ATA bus limitations.  Going down to minimum-sized transfers will add a 
lot of overhead and slow things down quite a bit.  I'd prefer to avoid 
it whenever possible.

(Having a MAX_SECTORS_64 flag rather than MAX_SECTORS_128 is kind of an
accident of history.  There's maybe only one device which actually
needs to be limited to 32 KB as far as I know, as opposed to a fair 
number that need to be limited to 64 KB.  Still, it's done now...)

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[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.