Subject: Re: direct copy() between two proc address spaces
To: Ian Zagorskih <>
From: Jaromir Dolecek <>
List: tech-kern
Date: 06/20/2004 19:17:07
Ian Zagorskih wrote:
> In short: Inside kernel, is it possibly to directly copy data from address 
> space of one process to address space of another process ?
> According to man pages there are copyin()/copyout() functions which move data 
> from user space to kernel space and back. In my case, i have two processes 
> struct proc *p1 and *p2 and i need to copy some block of data between p1 and 
> p2.
> Of course i can manually allocate temporary buffer inside kernel, copy data in 
> buffer from p1, copy data from buffer to p2 and free buffer. But this is 
> quite significant overhead and unneeded operations. Is there some direct way 
> to do this ?

I believe uiomove() can be used to move data from one process's
address space to anothers. I've actually wanted to experiment
with this to optimize pipes further.

> Thanks.
> // wbr

Jaromir Dolecek <>  
-=- We should be mindful of the potential goal, but as the Buddhist -=-
-=- masters say, ``You may notice during meditation that you        -=-
-=- sometimes levitate or glow.   Do not let this distract you.''   -=-