From: Andi Kleen <andi@firstfloor.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Kernel development list <linux-kernel@vger.kernel.org>,
AntonioLin <antonio.lin@alcormicro.com>,
David Vrabel <david.vrabel@csr.com>
Subject: Re: Scatter-gather list constraints
Date: Sat, 21 Jun 2008 17:21:11 +0200 [thread overview]
Message-ID: <485D1C67.7050907@firstfloor.org> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0806211050390.18735-100000@netrider.rowland.org>
Alan Stern wrote:
> On Sat, 21 Jun 2008, Andi Kleen wrote:
>
>> Alan Stern <stern@rowland.harvard.edu> writes:
>>
>>> This question arises in connection with wireless USB mass-storage
>>> devices. The controller driver requires that all DMA segments
>>> in a transfer, other than the last one, have a multiple of 1024 bytes.
>>> But we're sometimes getting s-g lists where an element contains an odd
>>> number of 512-byte sectors, and of course it doesn't work.
>> But you can handle a single 512 byte request?
>
> Yes. And we can handle a list containing a bunch of 1024-byte segments
> terminated by a single 512-byte segment.
>
>> Splitting the request
>> in this case should work. Or maybe copying is cheaper than splitting?
>
> Splitting would work. But it has to be done fairly high up in the
> stack, ideally in the block layer.
That's true. Or you would need to reserve requests for this, which is likely
a bad idea. Perhaps you're better off just copying in this (hopefully
rare) case. Fortunately lately thanks to work from Peter Z. allocating memory
in the write out path is much safer than it used to be.
Also for my edification: is that a general restriction of the wireless usb
spec or just a specific hardware quirk in some design?
>
>> I don't think the block layer knows about such kinds of restrictions.
>
> Evidently not. Is it feasible to add such knowledge to the block
> layer?
You would need to ask Jens, but I would assume he would ask:
- Is it common?
- Is it performance critical?
and presumably the answer to both would be "no" ?
-Andi
next prev parent reply other threads:[~2008-06-21 15:21 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-20 20:30 Scatter-gather list constraints Alan Stern
2008-06-20 20:50 ` David Miller
2008-06-21 13:59 ` Andi Kleen
2008-06-21 14:54 ` Alan Stern
2008-06-21 15:21 ` Andi Kleen [this message]
2008-06-21 21:50 ` Alan Stern
2008-06-21 23:00 ` Andi Kleen
2008-06-22 14:35 ` Alan Stern
2008-06-24 10:41 ` FUJITA Tomonori
2008-06-24 14:57 ` Alan Stern
2008-06-25 0:18 ` FUJITA Tomonori
2008-06-25 14:23 ` Alan Stern
2008-06-26 2:06 ` FUJITA Tomonori
2008-06-26 5:39 ` FUJITA Tomonori
2008-06-26 6:35 ` Jens Axboe
2008-06-26 6:58 ` FUJITA Tomonori
2008-06-26 12:39 ` Jens Axboe
2008-06-26 12:54 ` Andi Kleen
2008-06-26 13:00 ` Jens Axboe
2008-06-26 15:12 ` Alan Stern
2008-06-26 17:41 ` Jens Axboe
2008-08-27 21:32 ` Alan Stern
2008-06-26 15:16 ` Boaz Harrosh
2008-06-26 17:39 ` Jens Axboe
2008-06-26 14:18 ` Alan Stern
2008-06-23 14:46 ` David Vrabel
2008-06-23 15:12 ` Alan Stern
2008-06-23 19:06 ` David Vrabel
2008-06-23 19:45 ` Alan Stern
2008-06-23 21:53 ` Stefan Richter
2008-06-25 4:02 ` Perez-Gonzalez, Inaky
2008-06-25 14:24 ` Alan Stern
2008-06-26 16:43 ` Perez-Gonzalez, Inaky
2008-06-26 19:34 ` Alan Stern
2008-06-26 22:39 ` Inaky Perez-Gonzalez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=485D1C67.7050907@firstfloor.org \
--to=andi@firstfloor.org \
--cc=antonio.lin@alcormicro.com \
--cc=david.vrabel@csr.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox