Real async file IO on Linux?

Alan Bateman Alan.Bateman at oracle.com
Wed Jul 27 06:17:23 PDT 2011


Tim Fox wrote:
> Hello All,
>
> In anticipation of the iminent Java 7 release, I took a look at the 
> source for asynchronous file IO, and it seems to be "faking" async IO 
> by hiding old synchronous IO behind a thread pool.
>
> I'm interested in understanding why real OS async file IO hasn't been 
> used for those operating systems that support it. I'm particularly 
> interested in Linux support.
The issue at the time on Linux was that it wasn't supported for buffered 
file I/O (only direct I/O or block device). I haven't checked it 
recently to see if that was changed. It wouldn't be too hard to provide 
an implementation that uses io_submit etc. but it would like require us 
to provide a special open option and also provide a means to ensure that 
applications get direct buffers that are aligned appropriately.

-Alan.


More information about the nio-discuss mailing list