This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Implementing aio_* and lio_* (async i/o) on Cygwin


Corinna Vinschen wrote:
On Mar 19 22:53, Mark Geisert wrote:
Regardless of which file the code is in, I was thinking I should copy
syscalls.cc's pread() contents into aio_read(), for example, to start with.
Then add extra param(s) as needed to the fhandler method call as you
suggested.

That's definitely ok.  When I was talking about pread/pwrite in our
preliminary discussion on cygwin-patches, I was always talking about the
fhandler_disk_file::pread and fhandler_disk_file::pwrite methods in
fact, not the syscalls of the same name.  I'm sorry I was unclear there :}
[...]
Looks like you're on the right track, just go ahead.  We can fix the
finer details later.

OK, I've posted a 3-part patch set to cygwin-patches. This is still a WIP so it doesn't yet include what's been decided above. It currently queues async ops to cygthread worker threads.

I plan to update aio_read() and aio_write() to try to launch async ops inline, and only if they fail with ESPIPE would they be queued for worker thread action. (E.g., ops on sockets or other devices without pread/pwrite support.)

I think parts 1 and 2 of the patch set are essentially finished, unless there are issues to be corrected. But part 3 will need some more work done.
Thanks,

..mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]