From: Jens Axboe <axboe@suse.de>
To: Mark Lobo <ntdeveloper2002@yahoo.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: Bounce buffer usage
Date: Sat, 2 Nov 2002 10:12:56 +0100 [thread overview]
Message-ID: <20021102091256.GC31088@suse.de> (raw)
In-Reply-To: <20021101185510.10154.qmail@web80305.mail.yahoo.com>
On Fri, Nov 01 2002, Mark Lobo wrote:
>
> > Not so true anymore in 2.4.20-pre (and hasn't been
> > true in 2.5 since
> > 2.5.1). If you set host highmem_io flag,>
>
> So if I do set this flag in the host template, do I
> need the bounce buffer patch also that is floating
> around? Or is it just enough to set that flag and use
> the DMA API? Im using 2.4.18.
You need the patch, otherwise that template bool is not even there. Or
you just need 2.4.20-pre, the block-highmem patch has been integrated
since -pre2/3
> it will be
> > happy to pass you
> > pages that have no kernel virtual mapping.
>
> Pages that have no kernel virtual mapping? Do u mean
> pages with no kernel "logical" mapping? We finally
Yes
> need a kernel mapping, dont we? say if it is data in a
> single page ( no scatter gather ), what kind of
We don't the page mapped into the kernel virtual address space. For
scatter-gather setup, it's fine to know the physical address of such a
page. We can do clustering based on that. If the hardware (the platform,
not the controller) can further do iommu tricks on the resulting sg
table fine, but that's not our worry.
> address is passed down to the driver? Is it the pure
> user address that is just passed down, and the DMA API
> then gives the kernel address? cause we do need to do
> a virt_to_page in this case before we can use the DMA
> API, so what kind of virtual address is passed down to
> the initiator?
I think this is your problem. So you want to write out a page of memory.
You basically want to do
user address -> page -> virtual address -> page = virt_to_page(va) ->
dma map page
and this is a problem because for some pages we just don't have a
virtual kernel mapping. Instead you want to do
user address -> page -> dma map page
which doesn't require a virtual mapping at all. You want to pass down
page/length/offset tuplets to the dma mapping api, not virtual
addresses. Please read the document I pointed you at, it explains this
for you. You seem to be confused about several things in this area.
> >If the
> > buffer sent down resides at a higher address than
> > what the adapter can
> > handle, then it is bounced. This may not necessarily
> > have anything to do
> > with kernel virtual mapping or not.
>
> But if a buffer resides in high memory, and has no
> kernel logical mapping, doesnt it mean that bounce
> buffers will be used, especially in 2.4.18, without
> the highmem_io bit set?
2.4.18 without any patches will always bounce, there's nothing you can
do about it.
--
Jens Axboe
next prev parent reply other threads:[~2002-11-02 9:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-29 20:32 DC390 Deadlock in DataIn Klaus Fuerstberger
2002-10-30 0:08 ` 2.4.9 2.4.18 diff Mark Lobo
2002-10-30 2:04 ` Douglas Gilbert
2002-11-01 0:16 ` Bounce buffer usage Mark Lobo
2002-11-01 7:48 ` Jens Axboe
2002-11-01 18:55 ` Mark Lobo
2002-11-02 9:12 ` Jens Axboe [this message]
2002-11-03 22:10 ` Mark Lobo
2002-11-04 8:21 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2002-11-01 15:40 Infante, Jon
2002-11-01 16:01 ` Jens Axboe
2001-12-22 1:02 bounce " Randy.Dunlap
2001-12-23 14:09 ` Jens Axboe
2002-01-08 1:44 ` Randy.Dunlap
2002-01-08 7:42 ` Jens Axboe
2002-01-09 17:23 ` Randy.Dunlap
2002-01-09 18:10 ` Jens Axboe
2002-01-09 22:33 ` Rik van Riel
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=20021102091256.GC31088@suse.de \
--to=axboe@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=ntdeveloper2002@yahoo.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.