Re: Remote fork() and Parallel programming

Larry McVoy (lm@bitmover.com)
Wed, 17 Jun 1998 18:50:18 -0700


: > SGI took the libs, gutted 'em, leaving just the interfaces, and tuned them
: > especially for SMP machines (yeah, they can still call out to the networking
: > ones when they need to).
: >
: > They even did some VM hacking such that they could map another process'
: > address space so that a send() turned into
: >
: > find the process associated with the destination
: > make we've already mapped the destination
: > bcopy()
: >
: > It was damn close to no more than the bcopy() cost.
:
: IIRC, Unix domain sockets are implemented as a memory passing scheme. Since a
: UDS would conceivably be less resource intensive than actually doing a lookup
: PID, find the VMA, then copy, perhaps the energy would be better spent
: optimizing that functionality?

You only have to do the mmap() once, the first time. After that, the buffers
are available forever and you just do a hashed lookup in userspace, soemthing
that is very fast. Then do the bcopy. In Unix domain sockets or pipes,
you copy twice, once into the kernel and once out of the kernel, and that
copy dominates.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu