From: Jeff Garzik <jgarzik@pobox.com>
To: Mark Lord <liml@rtr.ca>
Cc: Jens Axboe <axboe@suse.de>,
IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: libata+SGIO: is .dma_boundary respected?
Date: Sun, 19 Mar 2006 16:38:59 -0500 [thread overview]
Message-ID: <441DCF73.2080600@pobox.com> (raw)
In-Reply-To: <441DCAC9.5090603@rtr.ca>
Mark Lord wrote:
> Jeff Garzik wrote:
>
>> Mark Lord wrote:
>>
>>> Jens / Jeff,
>>>
>>> Each libata driver registers a .dma_boundary field with SCSI.
>>> This field is used to prevent merging of bio segments across
>>> a hardware limitation boundary, usually 0xffff.
>>>
>>> This looks like it works for regular block I/O,
>>> but I'm not so sure about SGIO originated requests.
>>>
>>> Any thoughts, or code you can point me to?
>>
>>
>> Everything goes through the block layer, including SG_IO, so everyone
>> agrees on the boundaries that must be respected.
>>
>> scsi sets blk_queue_segment_boundary() then gets out of the way, for
>> the most part. BIOVEC_SEG_BOUNDARY() is the macro that accesses this.
>> Trace back and forth from there. You will probably run into a call to
>> blk_recount_segments() in __bio_add_page(), or maybe you'll check the
>> seg boundary from another path.
>
>
> Yeah, I'm familiar with that part, and thanks for the note about SGIO.
>
> So therefore, code to manage the dma_boundary is NOT necessary in sata
> drivers. Right? Currently we have in sata_mv.c:
>
> MV_DMA_BOUNDARY = 0xffff;
> while (sg_len) {
> offset = addr & MV_DMA_BOUNDARY;
> len = sg_len;
> if ((offset + sg_len) > 0x10000)
> len = 0x10000 - offset;
> ...
>
>
> That whole block should be able to go, then.
Incorrect. :)
The idiot IOMMU layer may merge too aggressively, which is the reason
for this code and similar code in ata_fill_sg(). The IOMMU stuff always
happens at pci_map_sg() time, after the block layer gets out of the way.
Jeff
next prev parent reply other threads:[~2006-03-19 21:39 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-19 20:48 libata+SGIO: is .dma_boundary respected? Mark Lord
2006-03-19 21:14 ` Jeff Garzik
2006-03-19 21:19 ` Mark Lord
2006-03-19 21:38 ` Jeff Garzik [this message]
2006-03-19 21:45 ` Mark Lord
2006-03-19 21:54 ` Mark Lord
2006-03-21 1:18 ` Jeff Garzik
2006-03-21 4:43 ` Mark Lord
2006-03-21 6:14 ` Jeff Garzik
2006-03-21 13:59 ` Mark Lord
2006-03-21 18:42 ` Jens Axboe
2006-03-21 19:18 ` Mark Lord
2006-03-21 19:29 ` Jeff Garzik
2006-03-21 19:31 ` Mark Lord
2006-03-21 19:33 ` Mark Lord
2006-03-21 19:35 ` Jens Axboe
2006-03-21 19:38 ` Jeff Garzik
2006-03-21 19:42 ` Jens Axboe
2006-03-21 19:43 ` James Bottomley
2006-03-21 19:46 ` Jens Axboe
2006-03-21 20:44 ` James Bottomley
2006-03-21 21:54 ` Benjamin Herrenschmidt
2006-03-21 19:31 ` Jens Axboe
2006-03-21 19:36 ` Mark Lord
2006-03-21 19:43 ` Jeff Garzik
2006-03-21 20:51 ` Mark Lord
2006-03-22 11:25 ` Tejun Heo
2006-03-22 14:52 ` Mark Lord
2006-03-21 1:15 ` Jeff Garzik
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=441DCF73.2080600@pobox.com \
--to=jgarzik@pobox.com \
--cc=axboe@suse.de \
--cc=liml@rtr.ca \
--cc=linux-ide@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).