Context :
Linux 64bits.
I am very well versed in shared memories, different IPCs mechanisms.
Currently, I am seeking something that could be used in userspace to notify change between two polled processes, to save cpu cycles.
I already know about futexes
, eventfd
, slow signals
and even char devices
.
But I am concerned about the latency involved.
Question :
I would like a very lightweight way to notify between two processes in userspace, without the context switch if possible, and a very low latency ( µs order of magnitude max or about).
No major constraints : no race condition prevention, no locking needed, but no busy waiting please (I manage the rushes and the slow pace periods already, and busy waiting would seriously deceive any optimizations on the long run).
If mmap could notify the changes without a msync()... I would not be asking.
Do you have an idea in your toolbox ?
Thanks
idea :
Just after asking, may come an idea : putting a file in a tmpfs and poll it... i expect the latency to be quite low, but I am not very sure..