Clebert Suconic wrote:
> Are you guys supporting Direct IO on Linux?
> I'm currently developing a native layer for LibAIO.. and for dealing
> with Direct IO i had to align buffers before writing them to the OS
As I'm sure you agree, direct I/O and bypassing the file system cache is
an advanced topic that a database might use but not the average
developer. Some time ago I prototyped an API for this so that alignment
of the file position (often the size of the disk sector) was exposed and
also a method to allocate a buffer that was appropriately aligned for a
given file system. It's not in the JSR-203 API at this time but could be
if it avoids needing to resort to native code for important cases (and
also doesn't complicate things for the average developer). Can you say
anything about your needs? Is is intended to run everywhere?
As you mention alignment I'm curious if you make any assumptions on the
alignment of direct buffers? Just asking because they have been page
aligned since 1.4 but we need to re-visit that for big applications that
enable large pages.
> Also.. Is the implementation available anywhere yet? I have seen some
> posts about pushing it to OpenJDK. Is it already available there?
All the main areas of NIO2 have been implemented for some time and the
original plan was to make it available as source + early access binaries
to allow people try it, provide feedback, contribute, etc. I apologize
but I completely underestimated how long it takes to get all the
mandatory approvals (export, trademarks, legal, ...) to release
something standalone. In the mean-time, the jdk7/OpenJDK repositories
have re-opened so we can also proceed with pushing the changes there
(which may be preferable to many as it avoids needing to build from the
source or using special binaries).