Rajagopal Ananth wrote:
> I have not looked into using sockets & KAIO ...
> KAIO has mostly been tested with disk I/O. On the otherhand,
> I can't think of a fundamental reason why sockets won't work;
> perhaps some code may need tweaking, like the odd behaviour
> we ran into with PIPEs. Is it possible for you send me
> a (small) piece of test code that I can use to try out
> the socket-KAIO behavior?
>
> thanks!
>
> ananth.
>
> PS: I just returned from a long sabbatical leave, so if any I
> didn't reply to any mail in this forum for the last 6 weeks,
> please resend it.
Here's some really crummy C++ code (note I basically cut and pasted from
some class libraries ;-) which demonstrates a failure on a read of a
socket. If the code works properly, it should emulate a VERY simple HTTP
server. The important thing to note is that if you set KAIO_READ to 0
(and therefore don't use KAIO) the application appears to run properly.
My observations are that with KAIO the program reads zero bytes into the
buffer and does not block at all on kaio_suspend. Note I have seperate
code doing this on a file and it seems to work fine.
--Chris 
|