linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lord <liml@rtr.ca>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Jens Axboe <axboe@suse.de>,
	IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: libata+SGIO:  is .dma_boundary respected?
Date: Tue, 21 Mar 2006 08:59:24 -0500	[thread overview]
Message-ID: <442006BC.8020100@rtr.ca> (raw)
In-Reply-To: <441F99AC.4000200@pobox.com>

Jeff Garzik wrote:
> Mark Lord wrote:
>> But (as I replied to myself earlier), I think it is a non issue,
>> because the IOMMU merging cannot produce more SG entries than
>> there were originally.  It may produce less, and the driver may then
>> end up splitting them apart again, but it will never exceed what
>> the block layer permitted in the first place.
> 
> That says nothing about the boundaries upon which the IOMMU layer will 
> or will not merge.  Without the fix, the problem case happens when (for 
> example) the IOMMU output produces sg_tablesize segments, but some of 
> those segments cross a 64k boundary and need to be split.

Yes, but the merging happens *after* the block layer has already
guaranteed an sg list that respects what the driver told it.

So worst case, the IOMMU merges the entire sg list into a single
multi-megabyte segment, and then the driver's fill_sg() function
splits it all apart again while making up it's PRD list.

Even in that worst case, the number of segments for the PRD list
will *always* be less than or equal to the size of the original
block layer sg list.

So no need for hocus-pocus divide by 2.
Good thing, too, because "divide by 2" would also fail
if the above stuff were not true.

Think about it some more.

Jens, you know more about this stuff than most folks:
What am I missing?

Thanks.

  reply	other threads:[~2006-03-21 13:59 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
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 [this message]
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=442006BC.8020100@rtr.ca \
    --to=liml@rtr.ca \
    --cc=axboe@suse.de \
    --cc=jgarzik@pobox.com \
    --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).