Chris Brody wrote: > Yeah, I spotted that in the diff as well...)
> My first reaction is that I am happy to see an easy-to-use AIO C-api > that works with libevent. Can you make a comparison to libeio by Mark > Lehmann (http://software.schmorp.de/pkg/libeio.html)? I've seen libeio prior to designing this API. I don't like the idea of declaring every fs operation as asynchronous, since it is far away from the reality and the only way to implement it are parallel threads. Parallel threads is what I'm trying to escape in order to reduce complexity of programming and unnecessary context switches, therefore I don't support initiatives in libevent towards parallel threads. However parallel threads is the only solution when you operate with large amounts of shared data, like in RDBMS. In this case they are probably inevitable, each of them should run independent event processing cycle, the number of threads should be equal to the number of processors and cpu affinity should be set. In other words each process should have it's own processor. Returning back to libeio, I have to say, that the design of eio_read and eio_write is very strict and convenient, therefore event_aio_read and event_aio_write are based on them. There are things what I don't like in my design. E.g. the number of arguments in AIO callback. It is 7. Could be less. But these arguments are very convenient in many contextless callbacks, therefore I made myself to keep them. One could think about introducing indicator of the operation performed as an 8th argument to the callback in order to be able to have only one callback for both reads and writes. But I find it unlikely to combine read and write callbacks for disk operations. > I have also noticed that recent versions of libevent as well as the > libev+libevent combination by Mark Lehmann have really been > modularized better than before. Can you consider a way to make the AIO > support into a set of modules that may be included by option? It is modularized in the same way as libevent itself, despite the fact that there are only few modules for now: aio_posix and aio_posix_kqueue (aio_linux is broken). I principally considered to make AIO modules controllable via options, this is not difficult. I think it is a good thing to advance first, since I expect a request from list to be able to switch off AIO completely, because not many platforms support it. -- Regards, Valery Kholodkov _______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users