[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Could kernel copy memory between processes directly?



Artur,

>look at the PT_IO request in ptrace(2).

Thanks, that's indeed a good start. This syscall calls procfs_domem that
does some mumbo-jumbo on MMU, but maybe I will be able to figure someting
out.

>But I'd do some real measurements of this before actually trying to use
it,
>the API is not designed to be a fast IPC, it's designed to be an easy to
use
>debugging tool and the overhead of each request is pretty big.

Sure.

>What you probably really want is a shared memory segment with mmap or
sysvshm.

Definitively no, everyone is saying that. If you haven't heard about
synchronous messaging I encourage you to read:

http://www.qnx.com/developer/docs/momentics_nc_docs/neutrino/sys_arch/kernel.html
(section "Synchronous message passing")

It's a bit similar to Mach messaging. The whole idea could be described
like procedure call into another process.

For shared memory processes must be trusted while for SRR the client
(Sender) cannot break the server (Receiver), Important factor, isn't it :-)

--

I've grepped the sources a bit and looks like I'd need a mixture of copyin
and copyout procedures. Too bad, hardware dependent... I should have known.


Regards,
Wojtek Narczynski