2 ms·
> Though perhaps what you meant was that you want to be able to tell the OS "yo, here's a bunch of buffers, use these to complete my reads"? Thank you for clar
by jstimpfle 8y ago
> Though perhaps what you meant was that you want to be able to tell the OS "yo, here's a bunch of buffers, use these to complete my reads"?
Thank you for clarifying, and yes, that would be the best way to do it I think.
> If a request is slow to be fulfilled won't it hog a buffer, reducing the maximum throughput of the fast requests? Why would this be a performance win?
So someone else here said that with IOCP the kernel doesn't have its own read buffers but writes directly to userspace memory (in cases where this is possible, anyway). So there might be a possiblity for buffer hogging, I don't know. On the other hand, when the request really is slow to be fulfilled, the OS could just call it a partial write and notify the program of a (partial) completion. In which case the buffer is free for other uses again.
- magicalhippo 8y agoThanks for the follow-up. Would be interesting to see if it made much difference in the end, guess we'll have to wait a bit longer for all of Windows to be open sourced :P