linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: "David S. Miller" <davem@redhat.com>
Cc: linux-kernel@vger.kernel.org, andrea@suse.de
Subject: Re: [patch] zero-bounce highmem I/O
Date: Thu, 16 Aug 2001 14:48:09 +0200	[thread overview]
Message-ID: <20010816144809.A4352@suse.de> (raw)
In-Reply-To: <20010816135150.X4352@suse.de> <20010816.045642.116348743.davem@redhat.com> <20010816140317.Y4352@suse.de> <20010816.052727.68039859.davem@redhat.com>
In-Reply-To: <20010816.052727.68039859.davem@redhat.com>

On Thu, Aug 16 2001, David S. Miller wrote:
>    From: Jens Axboe <axboe@suse.de>
>    Date: Thu, 16 Aug 2001 14:03:17 +0200
> 
>    > That is why PCI_MAX_DMA32, or whatever you would like to name it, does
>    > not make any sense.  It can be a shorthand for drivers themselves, but
>    > that is it and personally I'd rather they just put the bits there
>    > explicitly.
>    
>    Drivers, right. THe block stuff used it in _one_ place -- the
>    BLK_BOUNCE_4G define, to indicated the need to bounce anything above 4G.
>    But no problem, I can just define that to 0xffffffff myself.
> 
> How can "the block stuff" (ie. generic code) make legal use of this

Block stuff is a crappy name, the block layer :-)

> value?  Which physical bits it may address, this is a device specific
> attribute and has nothing to with with 4GB and highmem and PCI
> standard specifications. :-)

It didn't make use of this value, it merely provided it for _drivers_ to
use. Driver passes in a max dma address, block layer translates that
into a page address. As for 4GB, see below.

> In fact, this is not only a device specific attribute, it also has
> things to do with elements of the platform.
> 
> This is why we have things like pci_dma_supported() and friends.
> Let me give an example, for most PCI controllers on Sparc64 if your
> device can address the upper 2GB of 32-bit PCI space, one may DMA
> to any physical memory location via the IOMMU these controllers have.
> 
> There may easily be HIGHMEM platforms which operate this way.  So the
> result is that CONFIG_HIGHMEM does _not_ mean ">=4GB memory must be
> bounced".
> 
> Really, 0xffffffff is a meaningless value.  You have to test against
> device indicated capabilities for bouncing decisions.

Ok, I see where we are not seeing eye to eye. Really, I meant for the
PCI_MAX_DMA32 value to be 'Max address below 4GB' and not 'Max address
we can DMA to with 32-bit PCI'. Does that make sense? Maybe my
explanations weren't quite clear, and of course it didn't really help
that I shoved it in pci.h :-)

> You do not even know how "addressable bits" translates into "range of
> physical memory that may be DMA'd to/from by device".  If an IOMMU is
> present on the platform, these two things have no relationship
> whatsoever.  These two things happen to have a direct relationship
> on x86, but that is as far as it goes.

That's why I need you to sanity check the cross-platform stuff like
that :-). I see what you mean, point taken. Clearly I need to change the
blk_queue_bounce_limit stuff to check with the PCI capabilities.

> Enough babbling on my part, I'll have a look at your bounce patch
> later today. :-)

Thanks!

-- 
Jens Axboe


  reply	other threads:[~2001-08-16 12:46 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-15  7:50 [patch] zero-bounce highmem I/O Jens Axboe
2001-08-15  9:11 ` David S. Miller
2001-08-15  9:17   ` Jens Axboe
2001-08-15  9:26   ` Jens Axboe
2001-08-15 10:22   ` David S. Miller
2001-08-15 11:13     ` Jens Axboe
2001-08-15 11:47     ` David S. Miller
2001-08-15 12:07       ` Jens Axboe
2001-08-15 12:35       ` David S. Miller
2001-08-15 13:10         ` Jens Axboe
2001-08-15 14:25           ` David S. Miller
2001-08-16 11:51             ` Jens Axboe
2001-08-16 11:56             ` David S. Miller
2001-08-16 12:03               ` Jens Axboe
2001-08-16 12:14               ` Gerd Knorr
2001-08-16 12:27               ` David S. Miller
2001-08-16 12:48                 ` Jens Axboe [this message]
2001-08-16 12:56                 ` Jens Axboe
2001-08-16 13:08                 ` David S. Miller
2001-08-16 12:34               ` David S. Miller
2001-08-16 13:35                 ` Gerd Knorr
2001-08-16 14:15                 ` David S. Miller
2001-08-16 12:28             ` kill alt_address (Re: [patch] zero-bounce highmem I/O) David S. Miller
2001-08-15 14:02         ` [patch] zero-bounce highmem I/O David S. Miller
2001-08-16  5:52           ` Jens Axboe
2001-08-15 19:20     ` Gérard Roudier
2001-08-16  8:12     ` David S. Miller
     [not found] <no.id>
2001-08-16 14:56 ` Alan Cox
2001-08-17 10:18   ` Gerd Knorr

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=20010816144809.A4352@suse.de \
    --to=axboe@suse.de \
    --cc=andrea@suse.de \
    --cc=davem@redhat.com \
    --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).