public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Pierre Ossman <drzeus-list@drzeus.cx>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: How to map high memory for block io
Date: Fri, 27 Jan 2006 21:22:06 +0100	[thread overview]
Message-ID: <20060127202206.GH9068@suse.de> (raw)
In-Reply-To: <20060127201458.GA2767@flint.arm.linux.org.uk>

On Fri, Jan 27 2006, Russell King wrote:
> On Fri, Jan 27, 2006 at 09:04:33PM +0100, Pierre Ossman wrote:
> > Russell King wrote:
> > > I don't see what the problem is.  A sg entry is a list of struct page
> > > pointers, an offset, and a size.  As such, it can't describe a transfer
> > > which crosses a page because such a structure does not imply that one
> > > struct page follows another struct page.
> > 
> > If the pages do not strictly follow each other then there is a lot of
> > broken code in the kernel. drivers/mmc/mmci.c and drivers/block/ub.c
> > being two occurences since both assume they can access the entire entry
> > through a single mapping.
> 
> We don't make that assumption.  What we do is:
> 
> - map the current sg using kmap_atomic()
> - copy up to sg->length into or out of that mapping
> - unmap current sg
> - if we have reached the end of this sg, move on to the next
> 
> What this means is that we assume sg->offset + sg->length <= PAGE_SIZE
> in all cases, which is the same assumption architecture DMA code makes.
> If that's invalid, there's likely to be a lot of architecture DMA support
> which is broken.

That is definitely valid, same goes for the bio_vec structure. They map
_a_ page, after all :-)

-- 
Jens Axboe


  reply	other threads:[~2006-01-27 20:21 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-27  6:45 How to map high memory for block io Pierre Ossman
2006-01-27 10:26 ` Jens Axboe
2006-01-27 10:33   ` Pierre Ossman
2006-01-27 10:43     ` Jens Axboe
2006-01-27 12:14       ` Pierre Ossman
2006-01-27 12:39         ` Jens Axboe
2006-01-27 13:16           ` Pierre Ossman
2006-01-27 13:48             ` Pierre Ossman
2006-01-27 14:00               ` Jens Axboe
2006-01-27 14:14                 ` Pierre Ossman
2006-01-27 18:37             ` Pierre Ossman
2006-01-27 19:43         ` Russell King
2006-01-27 20:04           ` Pierre Ossman
2006-01-27 20:10             ` Jens Axboe
2006-01-27 20:14             ` Russell King
2006-01-27 20:22               ` Jens Axboe [this message]
2006-01-27 20:26                 ` Russell King
2006-01-27 20:38                   ` Pierre Ossman
2006-01-27 21:58                     ` Pierre Ossman
2006-01-27 22:54                       ` Russell King
2006-01-28 19:17                         ` Jens Axboe
2006-01-28 19:32                           ` Pierre Ossman
2006-01-29 15:22                             ` Jens Axboe
2006-01-30  7:57                               ` Pierre Ossman
2006-01-30  8:09                                 ` Jens Axboe
2006-01-31 18:39                                   ` Pierre Ossman
2006-03-01 23:29                                     ` Russell King
2006-03-02  7:21                                       ` Jens Axboe
2006-03-02  7:26                                       ` Pierre Ossman
2006-03-02  9:41                                         ` Russell King
2006-03-02  9:52                                           ` Pierre Ossman
2006-03-02 10:04                                             ` Russell King
2006-03-02 10:26                                               ` Pierre Ossman
2006-03-02 11:45                                                 ` Russell King
2007-01-30 20:41                                       ` Pierre Ossman
2006-01-27 20:28               ` Pierre Ossman
2006-01-27 20:12           ` Pierre Ossman
2006-01-27 20:16             ` Russell King

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=20060127202206.GH9068@suse.de \
    --to=axboe@suse.de \
    --cc=drzeus-list@drzeus.cx \
    --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