, . . , .
.
, , , , . .
, read() write() , , PIPE_BUF. (4K Linux, ). . , , memcpy 4K, , .
Volatile - , .
On the side of the note, with exactly the same design on AIX, we saw a huge performance degradation compared to a small design change when the author uses a write()memory-mapped file to update immediately. Not sure if this is AIX quirk - but if performance is important, you might want to benchmark it.
source
share