linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Aloni <da-x@monatomic.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Re: [PATCH] sata_mv: stabilize for 5081 and other fixes
Date: Sun, 12 Mar 2006 07:49:31 +0200	[thread overview]
Message-ID: <20060312054931.GA23943@localdomain> (raw)
In-Reply-To: <44137D39.3000704@pobox.com>

On Sat, Mar 11, 2006 at 08:45:29PM -0500, Jeff Garzik wrote:
> 
> This is adding a bug.
> 
> The IOMMU worst case requires a split for each s/g entry, due to DMA 
> boundary issues.  See mv_fill_sg() or ata_fill_sg().
> 
> Thus, the above "/ 2" is required.

Okay I figured it out - here we are using the SCSI sg driver, and 
a scatter-gatter entry generated by that driver will never cross 
a page boundery (nor a DMA boundary), because each userspace page 
is mapped into one scatter-gatter entry, so in that case the "/ 2" 
isn't needed. Coming to think about it, that's only valid on x86
and x86_64. Are there other architectures that break that assumption?

I'd still want to be able to read/write 1MB at a time, otherwise 
it would require massive userspace code rewrites in our application,
(limiting it to 0.5MB). Do you have any suggestions about how to do 
that? I mean, it is not trivial to pass 128 entries of 2*PAGE_SIZE 
based on userspace memory.

p.s. I thought scatter-gatter entries are only valid for the page 
they point to, it's good to learn new things :)

-- 
Dan Aloni
da-x@monatomic.org, da-x@colinux.org, da-x@gmx.net, dan@xiv.co.il

      parent reply	other threads:[~2006-03-12  5:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060308194627.GA22346@localdomain>
2006-03-12  1:45 ` [PATCH] sata_mv: stabilize for 5081 and other fixes Jeff Garzik
2006-03-12  5:24   ` Dan Aloni
2006-03-12  5:49   ` Dan Aloni [this message]

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=20060312054931.GA23943@localdomain \
    --to=da-x@monatomic.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@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).