Re: PF_MEMALLOC in 2.6

Oliver Neukum
2004-08-27T09:19:08Z

Am Freitag, 27. August 2004 05:25 schrieb Zephaniah E. Hull:
> On Fri, Aug 27, 2004 at 12:04:15AM +0200, Oliver Neukum wrote:
> >
> > > > Storage cannot do concurrent IO.
> > >
> > > I'm going to jump in here and ask a simple question, what is the
> > > blocking point that stops writes happening concurrent with reads?
> >
> > The protocol on USB allows one command at a time only.
>
> Are you sure on that? Before some of the locking changes it was
> possible with usbfs to issue a bulk request that may block on the
> device, then issue a bulk write before it finished. (Sometimes the write
> tells the other end to send stuff with the read.)
>
> Was this violating the spec or just an odd corner case?

6.2.1.
The device shall consider the CBW valid when:
- The CBW was recieved when the device had sent a CSW or after a reset

Sending two requests without reading the CSW in between is illegal.
So a storage device can only execute one command at a time.
As you have to evaluate the CSW just queuing the requests buys you little
and in terms of memory allocation is worse.
Besides, this applies only to the bulk only protocol variant and the storage
driver shall be universal.

Regards
Oliver