Testing Posix asynchronous I/O (was: Implementing...)

Mark Geisert mark@maxrnd.com
Thu Apr 19 09:22:00 GMT 2018


Mark Geisert wrote:
> On Tue, 3 Apr 2018, Corinna Vinschen wrote:
>> Some testcase (here on cygwin-developers, not as patch) would be
>> nice, too.
>
> I do have a couple already.  One is a (fairly large) test app I have that times
> various methods of copying the heap from one process to a child. AIO is one of
> those methods.  I could whittle that down to something using only AIO.  And the
> Linux man page for aio(7) has a sample program that can test AIO on something
> other than disk files.

In addition to those two test programs, there's iozone.  That supports AIO 
operations but would need to be ported to Cygwin.  IMNSHO iozone needs a -NG 
re-write.  It is 5 source files, no header files, and 1K of its 30K lines are 
#ifdef's.  And what it calls a Windows build is actually a Cygwin (32-bits) 
build.  But it's there if needed, modulo some work porting it.

I'm using the Linux man page aio(7) example to debug the AIO code now for the 
non-diskfile case.

The "heap transfer" program I mentioned earlier, heapxfer, allows me to specify 
heap size and number of simultaneous AIOs.  Simple cases, such as staying within 
AIO_MAX AIOs, work fine.  I recently finished debugging a testcase writing 1GB 
of data to a file using 512 AIOs.  So the first AIO_MAX AIOs launched as inline 
AIOs, while the remainder were queued.  Then as worker threads became available, 
they launched inline AIOs themselves.  Found a couple of nits but it's working now.

Comments or questions welcome.  I'll keep going on the testing.
Cheers,

..mark



More information about the Cygwin-developers mailing list