copyin+copyout in one step ?
Luigi Rizzo
rizzo at iet.unipi.it
Tue May 28 09:51:58 UTC 2013
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
More information about the freebsd-current
mailing list