Subject: Re: Measuring memory to memory copy operations (+ interrupts, DMA)
To: David Laight <david@l8s.co.uk>
From: Kamal R Prasad <kamalrpr@in.ibm.com>
List: tech-kern
Date: 08/22/2003 16:38:23
David Laight <david@l8s.co.uk>
Sent by: tech-kern-owner@NetBSD.org
08/22/2003 10:34 AM
 
        To:     Kamal R Prasad/India/IBM@IBMIN
        cc:     Eduardo Horvath <eeh@NetBSD.org>, tech-kern@NetBSD.org
        Subject:        Re: Measuring memory to memory copy operations (+ 
interrupts, DMA)

 

> yeah -this turned out to be a bigger problem than I imagined.
> how does one pin dynamically allocated memory in libc (so that it could 
be 
> used by an interrupt handler)?

> You can't, and shouldn't be trying to.

thanks.

> You MAY be able to do whatever you are trying to do by using mmap
I want to allocate small chunks of memory in libc and pass it down to the 
kernel for updates. If the update is being done in the clock interrupt 
handler, then Ive got to ensure the memory is pinned. mmap(MAP_PRIVATE | 
MMAP_ANONONYMOUS) followed by mlock() is perhaps the only way one can pin 
userland memory.

> (and writing an appropriate device driver).

 No -this is not device related stuff -just something that needs to be 
passed from userspace to kernel for modification.

thanks
-kamal

                 David

-- 
David Laight: david@l8s.co.uk