Re: contiguous memory blocks and zero copy
"Stark, Josef" <[email protected]>
| Newsgroups | gmane.comp.micro-kernel.l4.devel |
|---|---|
| Message-ID | <0E9B8524CEB45345BDDC5443F04630D10546EE9B@BADWLRZ-SWMBX13.ads.mwn.de> |
Hello, >How does L4Re handle contiguous memory blocks? >What are the system calls used to allocate and manage contiguous memory? >Is it possible to do zero copy data transfer between drivers and if so >how is it done in Fiasco (so in linux world you would say no copy_to_user() and copy_from_user() ) I'm not an expert but I would say that can be done by using a Dataspace. If you look into src/l4/pkg/examples/libs/l4re/c++/shared_ds/ you will find an example where two tasks share a block of memory. Basically, in order to grant both tasks access to the dataspace, you need an IPC-Gate between the two (just like when you do regular IPC). Then the client (which wants to get access to the ds of the server) writes an instance of Small_buf, initialised with an allocated dataspace capability, into an Ipc_iostream (see line 38 of interface.h) and then makes an IPC-call to the server. The server writes its dataspace capability into an Ipc_iostream and answers. The kernel then maps the capability to the client, so now both tasks have access to the dataspace. Josef