All of lore.kernel.org
 help / color / mirror / Atom feed
* mpc8548 does not make use of DMA when doing memory copy?
@ 2009-11-02 15:40 hank peng
  2009-11-02 17:32 ` Kumar Gala
  0 siblings, 1 reply; 6+ messages in thread
From: hank peng @ 2009-11-02 15:40 UTC (permalink / raw)
  To: linuxppc-dev

Kernel version is 2.6.30 and I have enabled fsl DMA engine during
configuring kernel. After system booted, I have seen only 38 DMA
interrupts, and no increase later when I am doing data transfer
through network.
So I wonder if mpc8548  had made use of DMA engine when doing memcpy,
or maybe if there are other things I haven't noticed?

-- 
The simplest is not all best but the best is surely the simplest!

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

* Re: mpc8548 does not make use of DMA when doing memory copy?
  2009-11-02 15:40 mpc8548 does not make use of DMA when doing memory copy? hank peng
@ 2009-11-02 17:32 ` Kumar Gala
  2009-11-03  0:35   ` hank peng
  0 siblings, 1 reply; 6+ messages in thread
From: Kumar Gala @ 2009-11-02 17:32 UTC (permalink / raw)
  To: hank peng; +Cc: linuxppc-dev


On Nov 2, 2009, at 9:40 AM, hank peng wrote:

> Kernel version is 2.6.30 and I have enabled fsl DMA engine during
> configuring kernel. After system booted, I have seen only 38 DMA
> interrupts, and no increase later when I am doing data transfer
> through network.
> So I wonder if mpc8548  had made use of DMA engine when doing memcpy,
> or maybe if there are other things I haven't noticed?

The dma engine code is not normally used for normal memcpy's in the  
kernel.  There are explicit call sites that have async behavior that  
should use it (like the networking code).

- k

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

* Re: mpc8548 does not make use of DMA when doing memory copy?
  2009-11-02 17:32 ` Kumar Gala
@ 2009-11-03  0:35   ` hank peng
  2009-11-03  8:40     ` Micha Nelissen
  0 siblings, 1 reply; 6+ messages in thread
From: hank peng @ 2009-11-03  0:35 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev

2009/11/3 Kumar Gala <galak@kernel.crashing.org>:
>
> On Nov 2, 2009, at 9:40 AM, hank peng wrote:
>
>> Kernel version is 2.6.30 and I have enabled fsl DMA engine during
>> configuring kernel. After system booted, I have seen only 38 DMA
>> interrupts, and no increase later when I am doing data transfer
>> through network.
>> So I wonder if mpc8548 =C2=A0had made use of DMA engine when doing memcp=
y,
>> or maybe if there are other things I haven't noticed?
>
> The dma engine code is not normally used for normal memcpy's in the kerne=
l.
> =C2=A0There are explicit call sites that have async behavior that should =
use it
> (like the networking code).
>
I remember normal memory copy can also be done (chosen by user) by DMA
engine on IOP80331(Intel embedded cpu, xscale arch), so why ppc
platform didn't make use of DMA doing memory copy, I think it can
increase performance, please correct me if I am wrong!

> - k
>



--=20
The simplest is not all best but the best is surely the simplest!

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

* Re: mpc8548 does not make use of DMA when doing memory copy?
  2009-11-03  0:35   ` hank peng
@ 2009-11-03  8:40     ` Micha Nelissen
  2009-11-03 14:38       ` hank peng
  0 siblings, 1 reply; 6+ messages in thread
From: Micha Nelissen @ 2009-11-03  8:40 UTC (permalink / raw)
  To: hank peng, linuxppc-dev

hank peng wrote:
> I remember normal memory copy can also be done (chosen by user) by DMA
> engine on IOP80331(Intel embedded cpu, xscale arch), so why ppc
> platform didn't make use of DMA doing memory copy, I think it can
> increase performance, please correct me if I am wrong!

AFAIK the DMA engine has only an asynchronous mode (not very smart 
IMHO). This means you always have the overhead of context switch + 
interrupt + context switch, so the transfer has to be quite large for 
this to pay off.

Micha

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

* Re: mpc8548 does not make use of DMA when doing memory copy?
  2009-11-03  8:40     ` Micha Nelissen
@ 2009-11-03 14:38       ` hank peng
  2009-11-04  6:25         ` Kumar Gala
  0 siblings, 1 reply; 6+ messages in thread
From: hank peng @ 2009-11-03 14:38 UTC (permalink / raw)
  To: Micha Nelissen; +Cc: linuxppc-dev

2009/11/3 Micha Nelissen <micha@neli.hopto.org>:
> hank peng wrote:
>>
>> I remember normal memory copy can also be done (chosen by user) by DMA
>> engine on IOP80331(Intel embedded cpu, xscale arch), so why ppc
>> platform didn't make use of DMA doing memory copy, I think it can
>> increase performance, please correct me if I am wrong!
>
> AFAIK the DMA engine has only an asynchronous mode (not very smart IMHO).
> This means you always have the overhead of context switch + interrupt +
> context switch, so the transfer has to be quite large for this to pay off.
>
but if the amount of data I want to copy is big enough? can we benefit
from using DMA in such case?
> Micha
>



-- 
The simplest is not all best but the best is surely the simplest!

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

* Re: mpc8548 does not make use of DMA when doing memory copy?
  2009-11-03 14:38       ` hank peng
@ 2009-11-04  6:25         ` Kumar Gala
  0 siblings, 0 replies; 6+ messages in thread
From: Kumar Gala @ 2009-11-04  6:25 UTC (permalink / raw)
  To: hank peng; +Cc: linuxppc-dev


On Nov 3, 2009, at 8:38 AM, hank peng wrote:

> 2009/11/3 Micha Nelissen <micha@neli.hopto.org>:
>> hank peng wrote:
>>>
>>> I remember normal memory copy can also be done (chosen by user) by  
>>> DMA
>>> engine on IOP80331(Intel embedded cpu, xscale arch), so why ppc
>>> platform didn't make use of DMA doing memory copy, I think it can
>>> increase performance, please correct me if I am wrong!
>>
>> AFAIK the DMA engine has only an asynchronous mode (not very smart  
>> IMHO).
>> This means you always have the overhead of context switch +  
>> interrupt +
>> context switch, so the transfer has to be quite large for this to  
>> pay off.
>>
> but if the amount of data I want to copy is big enough? can we benefit
> from using DMA in such case?

Correct, we just don't make normal memcpy do this.  There isn't  
anything stopping specific call from using the async DMA API to get  
memcpy behavior.

- k

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

end of thread, other threads:[~2009-11-04  6:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-02 15:40 mpc8548 does not make use of DMA when doing memory copy? hank peng
2009-11-02 17:32 ` Kumar Gala
2009-11-03  0:35   ` hank peng
2009-11-03  8:40     ` Micha Nelissen
2009-11-03 14:38       ` hank peng
2009-11-04  6:25         ` Kumar Gala

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.