Re: copyin+copyout in one step ?

From: Luigi Rizzo <rizzo_at_iet.unipi.it>
Date: Tue, 28 May 2013 11:51:56 +0200
On Tue, May 28, 2013 at 6:56 AM, Zaphod Beeblebrox <zbeeble_at_gmail.com>wrote:

> On Mon, May 27, 2013 at 7:38 PM, Luigi Rizzo <rizzo_at_iet.unipi.it> wrote:
>
>>
>> say a process P1 wants to use the kernel to copy the content of a
>> buffer SRC (in its user address space) to a buffer DST (in the
>> address space of another process P2), and assume that P1 issues the
>> request to the kernel when P2 has already told the kernel where the
>> data should go:
>>
>
> Urm... Isn't the use of shared memory the more obvious way to transfer
> data between processes?  Am I missing some nuance?
>

see my other message about the use between VMs.

I cannot simply share memory because otherwise 

the sender could
alter the message while the receiver is playing with it,
so at least one copy is needed (or page flipping, but that
would be way more complex/wasteful/
expensive)

.

But also, in my case the source and destination buffers
are chosen arbitrarily by the two VMs, and do not necessarily
reside in the mmapped buffers that the kernel module provides.
So at the moment I have three copies instead of one.

cheers
luigi
Received on Tue May 28 2013 - 07:51:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:38 UTC