public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] allow drivers to flush in-flight DMA v2
@ 2007-09-28  1:09 akepner
  2007-09-28 22:43 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: akepner @ 2007-09-28  1:09 UTC (permalink / raw)
  To: Grant Grundler, Jesse Barnes, Jes Sorensen, Randy Dunlap,
	RolandDreier, James Bottomley
  Cc: linux-kernel


On Altix, DMA may be reordered between a device and host memory. 
This reordering can happen in the NUMA interconnect, and it usually 
results in correct operation and improved performance. In some 
situations it may be necessary to explicitly synchronize DMA from 
the device.

This patchset allows a memory region to be mapped with a "dmabarrier". 
Writes to the memory region will cause in-flight DMA to be flushed, 
providing a mechanism to order DMA from a device.

There are 4 patches in this patchset:

  [1/4] dma: add dma_flags_set_dmabarrier() to dma interface
  [2/4] dma: redefine dma_flags_set_dmabarrier() for sn-ia64
  [3/4] dma: document dma_flags_set_dmabarrier()
  [4/4] mthca: allow setting "dmabarrier" on user-allocated memory

-- 
Arthur


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

* Re: [PATCH 0/4] allow drivers to flush in-flight DMA v2
  2007-09-28  1:09 [PATCH 0/4] allow drivers to flush in-flight DMA v2 akepner
@ 2007-09-28 22:43 ` David Miller
  2007-10-03  1:04   ` akepner
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2007-09-28 22:43 UTC (permalink / raw)
  To: akepner
  Cc: grundler, jbarnes, jes, randy.dunlap, rdreier, James.Bottomley,
	linux-kernel

From: akepner@sgi.com
Date: Thu, 27 Sep 2007 18:09:26 -0700

> 
> On Altix, DMA may be reordered between a device and host memory. 
> This reordering can happen in the NUMA interconnect, and it usually 
> results in correct operation and improved performance. In some 
> situations it may be necessary to explicitly synchronize DMA from 
> the device.
> 
> This patchset allows a memory region to be mapped with a "dmabarrier". 
> Writes to the memory region will cause in-flight DMA to be flushed, 
> providing a mechanism to order DMA from a device.

My only beef with this patch set is that it seems
a bit much to create a totally new function name every
time we want to set some kind of new attribute on some
DMA object.  Why not add a "dma_set_flags()" or similar
that can be used later on to set other kinds of aspects
we'd like to change?

You can make the arguments "u32 flags" and "int dir".
Actually you should probably use the dma direction
enumaration instead of 'int'.

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

* Re: [PATCH 0/4] allow drivers to flush in-flight DMA v2
  2007-09-28 22:43 ` David Miller
@ 2007-10-03  1:04   ` akepner
  2007-10-03 17:10     ` Jesse Barnes
  0 siblings, 1 reply; 4+ messages in thread
From: akepner @ 2007-10-03  1:04 UTC (permalink / raw)
  To: David Miller
  Cc: grundler, jbarnes, jes, randy.dunlap, rdreier, James.Bottomley,
	linux-kernel

On Fri, Sep 28, 2007 at 03:43:39PM -0700, David Miller wrote:
> ....
> My only beef with this patch set is that it seems
> a bit much to create a totally new function name every
> time we want to set some kind of new attribute on some
> DMA object.  Why not add a "dma_set_flags()" or similar
> that can be used later on to set other kinds of aspects
> we'd like to change?
> 
> You can make the arguments "u32 flags" and "int dir".
> Actually you should probably use the dma direction
> enumaration instead of 'int'.

OK, this will be in the next version along with the 
coding style changes you mentioned.

-- 
Arthur


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

* Re: [PATCH 0/4] allow drivers to flush in-flight DMA v2
  2007-10-03  1:04   ` akepner
@ 2007-10-03 17:10     ` Jesse Barnes
  0 siblings, 0 replies; 4+ messages in thread
From: Jesse Barnes @ 2007-10-03 17:10 UTC (permalink / raw)
  To: akepner
  Cc: David Miller, grundler, jes, randy.dunlap, rdreier,
	James.Bottomley, linux-kernel

On Tuesday, October 2, 2007 6:04 pm akepner@sgi.com wrote:
> On Fri, Sep 28, 2007 at 03:43:39PM -0700, David Miller wrote:
> > ....
> > My only beef with this patch set is that it seems
> > a bit much to create a totally new function name every
> > time we want to set some kind of new attribute on some
> > DMA object.  Why not add a "dma_set_flags()" or similar
> > that can be used later on to set other kinds of aspects
> > we'd like to change?
> >
> > You can make the arguments "u32 flags" and "int dir".
> > Actually you should probably use the dma direction
> > enumaration instead of 'int'.
>
> OK, this will be in the next version along with the
> coding style changes you mentioned.

I can't find it now, but IIRC Dave, you vehemently opposed adding a 
flags argument awhile back (~2000), so SGI has been reluctant to push 
it again. :)

Glad you're finally coming around, I think a flags argument makes sense, 
as long as we're careful about adding new ones.

Jesse

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

end of thread, other threads:[~2007-10-03 17:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-28  1:09 [PATCH 0/4] allow drivers to flush in-flight DMA v2 akepner
2007-09-28 22:43 ` David Miller
2007-10-03  1:04   ` akepner
2007-10-03 17:10     ` Jesse Barnes

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