public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [openib-general] Re: [PATCH 21 of 53] ipath - use phys_to_virt instead of bus_to_virt
  2006-05-15 21:28     ` Roland Dreier
@ 2006-05-15 23:13       ` Grant Grundler
  2006-05-15 23:16         ` Roland Dreier
  0 siblings, 1 reply; 6+ messages in thread
From: Grant Grundler @ 2006-05-15 23:13 UTC (permalink / raw)
  To: Roland Dreier
  Cc: Bryan O'Sullivan, Segher Boessenkool, linux-kernel,
	openib-general

On Mon, May 15, 2006 at 02:28:45PM -0700, Roland Dreier wrote:
>     Bryan> Any ideas?  Should this turn from a one-liner into a
>     Bryan> big-refactor-for-2.6.18 patch?
> 
> I don't think there's a quick way to fix this.  What you really want
> to do is override the DMA mapping functions for your device so that
> you can keep track of the kernel mapping.

Or figure out which openib.org interface has to change so the
original virt addresses that were registered/handed to the ULP
are passed down to the low level interface driver too.
Seems like a more obvious way to fix the problem.
Someone did suggest this already, right?

> (cf the ehca driver), and I think patches to do it on x86-64 are
> floating around as part of the "Calgary IOMMU" work.

parisc has been using dma_ops for several years.
I don't expect dma_ops to become part of generic code.
DMA support is inherently arch specific.
Because of that, I don't look forward to a low level
device driver that is mucking with dma_ops.

hth,
grant

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [openib-general] Re: [PATCH 21 of 53] ipath - use phys_to_virt instead of bus_to_virt
  2006-05-15 23:13       ` [openib-general] " Grant Grundler
@ 2006-05-15 23:16         ` Roland Dreier
  2006-05-15 23:30           ` Grant Grundler
  0 siblings, 1 reply; 6+ messages in thread
From: Roland Dreier @ 2006-05-15 23:16 UTC (permalink / raw)
  To: Grant Grundler
  Cc: Bryan O'Sullivan, Segher Boessenkool, linux-kernel,
	openib-general

    Grant> Or figure out which openib.org interface has to change so
    Grant> the original virt addresses that were registered/handed to
    Grant> the ULP are passed down to the low level interface driver
    Grant> too.  Seems like a more obvious way to fix the problem.
    Grant> Someone did suggest this already, right?

It's been suggested many times, but no one ever comes up with a way to
handle the fact that RDMA means that addresses come from remote
systems as well as being passed in through an API.

 - R.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [openib-general] Re: [PATCH 21 of 53] ipath - use phys_to_virt instead of bus_to_virt
  2006-05-15 23:16         ` Roland Dreier
@ 2006-05-15 23:30           ` Grant Grundler
  2006-05-15 23:34             ` Roland Dreier
  0 siblings, 1 reply; 6+ messages in thread
From: Grant Grundler @ 2006-05-15 23:30 UTC (permalink / raw)
  To: Roland Dreier
  Cc: Grant Grundler, Bryan O'Sullivan, Segher Boessenkool,
	linux-kernel, openib-general

On Mon, May 15, 2006 at 04:16:45PM -0700, Roland Dreier wrote:
>     Grant> Or figure out which openib.org interface has to change so
>     Grant> the original virt addresses that were registered/handed to
>     Grant> the ULP are passed down to the low level interface driver
>     Grant> too.  Seems like a more obvious way to fix the problem.
>     Grant> Someone did suggest this already, right?
> 
> It's been suggested many times, but no one ever comes up with a way to
> handle the fact that RDMA means that addresses come from remote
> systems as well as being passed in through an API.

Aren't remote addresses handled differently than local ones?
ULP has to map local addresses.
We can't map remote ones (remote host maps it).
The ULP must know the difference and can tell the lower level
driver which is which.

Sorry, I hope my ignorance of RDMA isn't getting in the way again.

thanks,
grant

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [openib-general] Re: [PATCH 21 of 53] ipath - use phys_to_virt instead of bus_to_virt
  2006-05-15 23:30           ` Grant Grundler
@ 2006-05-15 23:34             ` Roland Dreier
  0 siblings, 0 replies; 6+ messages in thread
From: Roland Dreier @ 2006-05-15 23:34 UTC (permalink / raw)
  To: Grant Grundler
  Cc: Bryan O'Sullivan, Segher Boessenkool, linux-kernel,
	openib-general

    Grant> Aren't remote addresses handled differently than local
    Grant> ones?  ULP has to map local addresses.  We can't map remote
    Grant> ones (remote host maps it).  The ULP must know the
    Grant> difference and can tell the lower level driver which is
    Grant> which.

The problem is that RDMA requests have to be handled by the low-level
driver (or hardware) without any ULP involvement.  So every device has
to handle getting messages like "send me XXX bytes of data from
address YYY in the memory region corresponding to R_Key ZZZ."

 - R.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [openib-general] Re: [PATCH 21 of 53] ipath - use phys_to_virt instead of bus_to_virt
@ 2006-05-15 23:40 Caitlin Bestler
  2006-05-15 23:50 ` Roland Dreier
  0 siblings, 1 reply; 6+ messages in thread
From: Caitlin Bestler @ 2006-05-15 23:40 UTC (permalink / raw)
  To: Roland Dreier, Grant Grundler
  Cc: openib-general, linux-kernel, Segher Boessenkool

openib-general-bounces@openib.org wrote:
>     Grant> Aren't remote addresses handled differently than local
>     Grant> ones?  ULP has to map local addresses.  We can't map remote
>     Grant> ones (remote host maps it).  The ULP must know the
>     Grant> difference and can tell the lower level driver which is   
> Grant> which. 
> 
> The problem is that RDMA requests have to be handled by the
> low-level driver (or hardware) without any ULP involvement.
> So every device has to handle getting messages like "send me
> XXX bytes of data from address YYY in the memory region
> corresponding to R_Key ZZZ."
> 

True, but how does that constrain the local interfaces by which
the driver is informed of the set of pages that back a given
memory region? The driver must still ultimately provide dma
accessible addresses to the device. RDMA just changes the
timing of the steps, albeit radically, but not what the
steps are.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [openib-general] Re: [PATCH 21 of 53] ipath - use phys_to_virt instead of bus_to_virt
  2006-05-15 23:40 [openib-general] Re: [PATCH 21 of 53] ipath - use phys_to_virt instead of bus_to_virt Caitlin Bestler
@ 2006-05-15 23:50 ` Roland Dreier
  0 siblings, 0 replies; 6+ messages in thread
From: Roland Dreier @ 2006-05-15 23:50 UTC (permalink / raw)
  To: Caitlin Bestler
  Cc: Grant Grundler, openib-general, linux-kernel, Segher Boessenkool

    Caitlin> True, but how does that constrain the local interfaces by
    Caitlin> which the driver is informed of the set of pages that
    Caitlin> back a given memory region? The driver must still
    Caitlin> ultimately provide dma accessible addresses to the
    Caitlin> device. RDMA just changes the timing of the steps, albeit
    Caitlin> radically, but not what the steps are.

It's only a problem for "reserved L_Key" types of things, where the
device is supposed to just use the address given in a work request
without translating it.  No translation means that work requests have
to contain "bus addresses" -- addresses that are what the device would
put on the bus to access memory.  But if a device needs to simulate
DMA in software, then it really needs a kernel virtual address, not a
bus address.  But it's pretty ugly to have to put that knowledge in
every consumer.

 - R.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-05-15 23:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-15 23:40 [openib-general] Re: [PATCH 21 of 53] ipath - use phys_to_virt instead of bus_to_virt Caitlin Bestler
2006-05-15 23:50 ` Roland Dreier
  -- strict thread matches above, loose matches on Subject: below --
2006-05-12 23:43 Bryan O'Sullivan
2006-05-15 15:50 ` Roland Dreier
2006-05-15 21:21   ` Bryan O'Sullivan
2006-05-15 21:28     ` Roland Dreier
2006-05-15 23:13       ` [openib-general] " Grant Grundler
2006-05-15 23:16         ` Roland Dreier
2006-05-15 23:30           ` Grant Grundler
2006-05-15 23:34             ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox