Fast interprocess messaging
Fast interprocess messaging
Posted Sep 16, 2010 4:12 UTC (Thu) by neilbrown (subscriber, #359)Parent article: Fast interprocess messaging
Open /proc/$PID/mem with O_DIRECT (maybe) and use pread / pwrite.
Or maybe readv/writev.
I don't see the need to invent a new syscall (unless maybe preadv/pwritev would be helpful).
Posted Sep 16, 2010 6:13 UTC (Thu)
by nikanth (guest, #50093)
[Link] (2 responses)
Posted Sep 16, 2010 6:47 UTC (Thu)
by nikanth (guest, #50093)
[Link] (1 responses)
Posted Sep 16, 2010 10:26 UTC (Thu)
by intgr (subscriber, #39733)
[Link]
Another problem with opening /proc/*/mem is that every process needs to keep a file handle open for every other process that it wants to communicate to. So if you have N processes communicating to each other, they will need N2 file handles total. Now I'm not sure if this actually matters in the HPC world, they have tons of memory anyway... Just a thought. The alternative is opening the mem file for each message, send it and close it again. Maybe it works sufficiently well with the VFS scalability patches, but it still seems inefficient.
Posted Sep 16, 2010 8:30 UTC (Thu)
by mjthayer (guest, #39183)
[Link]
I suppose that an advantage of copy_*_process would be that it will be more convenient to implement on other systems.
Fast interprocess messaging
Waiting for your mail in that thread in LKML.
Fast interprocess messaging
To use /proc/$pid/mem the process needs to be ptraced.
May be that restriction will be removed instead of new syscalls.
Fast interprocess messaging
Fast interprocess messaging
> Open /proc/$PID/mem with O_DIRECT (maybe) and use pread / pwrite.