Shared memory and IPC

Luke Kenneth Casson Leighton lkcl at
Tue Sep 11 04:45:02 GMT 2001

On Mon, Sep 10, 2001 at 10:04:03AM -0500, Steve Langasek wrote:
> Hi Luke,
> On Mon, 10 Sep 2001, Luke Kenneth Casson Leighton wrote:
> > the implementation has, if you to are pass over data
> > structures between programs, presumably in exactly
> > the same way that those DB apps are doing, you must
> > preserve pointers / memory segment offsets.
> > and that means using MMAP_FIXED.
> > if anyone has any better ideas, love to hear them.
> You say you're doing this to avoid a bottleneck.  But the bottleneck is with
> trying to pass an entire structure through a pipe.  If you just pass
> /pointers/ across the pipe, then it no longer matters if you've managed to
> mmap() at exactly the same memory address, does it?  Just pass relative
> offsets between processes and let each process can keep track for itself of
> the absolute base address that's valid for that process.

what i'm trying to avoid is doing even _that_.

what i want to see is to actually end up with a small amount of
code that passes the arguments from the client-side call directly
to the server-side implementation of the call, where all
function call arguments require zero modification, and so
_can_ be passed directly over, even though the client-side
call is performed in one process and the server-side actioning
is performed in another process.

so the only overhead should be the code that detects that
an individual function call is local, not remote, performs
some signalling to get the client-side process to wait,
the server-side to wake up... you get the idea.

mad?  bizarre?  yes, you got it: that's COM optimisation
for you :)


More information about the samba-technical mailing list