Subject: Re: Measuring memory to memory copy operations (+ interrupts, DMA)
To: None <pms-netbsd@sommerhein.com>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 08/08/2003 15:52:46
Yes, DMA can still happen while interrups are off.  On the PCI bus any
bus mastering device can do cycles.  E.g., if you have a USB controller it
will access memory every ms regardless of any transfers that have been 
set up.

    -- Lennart

Paul Sommerhein wrote:

>I am measuring some memory to memory copy operations within the kernel.
>Doing this I try to minimize disturbances which affect the measured
>cycle count.  Currently I can only see the following ways.
>
>    - Disabling interrupts (or raising the interrupt priority level to a
>      high level).
>
>    - Flushing instruction and data caches.
>
>    - Serializing (finishing the instructions in the pipeline before
>      probing).
>
>But, given that the interrupts are turned off, will DMA transfers still
>be occurring?  Implying that if a device doing DMA grabs the memory bus
>just before I start my memory to memory copying, will I have to wait for
>the device to release the bus?
>
>Thanks,
>Paul
>
>  
>