3 ms·
I'm not disagreeing with this. However, the specified algorithm which I was posting about was read then write. It is what the parent said, not mmap then send. T
by sophacles 16y ago
I'm not disagreeing with this. However, the specified algorithm which I was posting about was read then write. It is what the parent said, not mmap then send. The two sets of calls have very different semantics as you said. For the case of
data = read(fd, blocksize, dataptr);
while (data > 0) {
write(sock, data, ...);
data = read(fd, blocksize, dataptr);
}
My statement holds true. Even if the context switching is minimal overhead, there are more context switches caused by my code, and further blocking and other processes add more delays.