Subject: Measuring memory to memory copy operations (+ interrupts, DMA)
To: None <tech-kern@netbsd.org>
From: Paul Sommerhein <pms-netbsd@sommerhein.com>
List: tech-kern
Date: 08/08/2003 15:09:27
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