mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* scatterlist.c or dma_map_sg() should coalesce?
@ 2008-09-28 15:47 Leon Woestenberg
  2008-09-28 17:11 ` FUJITA Tomonori
  0 siblings, 1 reply; 2+ messages in thread
From: Leon Woestenberg @ 2008-09-28 15:47 UTC (permalink / raw)
  To: linux-kernel

Hello,

in 2.6.27+, if I want to create a scatterlist of a large buffer in
virtual memory in a device driver, can I expect the scatterlist and/or
mapping API to provide me with a minimal list, each entry describing a
maximum bus-contiguous piece of memory? (i.e. can I assume coalescing
is done for me?).

In 2.6.24, dma_map_sg() *may* coalesce, but doesn't do so for my
platform, so for optimal DMA transfers the device driver needs to
coalesce the list entries.

Regards,
-- 
Leon

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

* Re: scatterlist.c or dma_map_sg() should coalesce?
  2008-09-28 15:47 scatterlist.c or dma_map_sg() should coalesce? Leon Woestenberg
@ 2008-09-28 17:11 ` FUJITA Tomonori
  0 siblings, 0 replies; 2+ messages in thread
From: FUJITA Tomonori @ 2008-09-28 17:11 UTC (permalink / raw)
  To: leon.woestenberg; +Cc: linux-kernel

On Sun, 28 Sep 2008 17:47:59 +0200
"Leon Woestenberg" <leon.woestenberg@gmail.com> wrote:

> Hello,
> 
> in 2.6.27+, if I want to create a scatterlist of a large buffer in
> virtual memory in a device driver, can I expect the scatterlist and/or
> mapping API to provide me with a minimal list, each entry describing a
> maximum bus-contiguous piece of memory? (i.e. can I assume coalescing
> is done for me?).

No, it's not the job of dma_map_sg. Before dma_map_sg, physical
continuous page frames in a scatter list are supposed be coalesced.
For example, the block layer creates a scatter list in which physical
continuous page frames are coalesced for SCSI drivers.


> In 2.6.24, dma_map_sg() *may* coalesce, but doesn't do so for my
> platform, so for optimal DMA transfers the device driver needs to
> coalesce the list entries.

With some of IOMMUs, dma_map_sg might coalesce virtual and physical
continuous page frames. If 2.6.24 doesn't do for you, 2.6.27 doesn't
too.

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

end of thread, other threads:[~2008-09-28 17:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-28 15:47 scatterlist.c or dma_map_sg() should coalesce? Leon Woestenberg
2008-09-28 17:11 ` FUJITA Tomonori

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

all inboxes | Powered by JetHome®