Hi All,

Our most recent version of our DirectIO patch is available at 
http://cr.openjdk.java.net/~kkharbas/8164900/webrev.04/
In this version, we have modified the following items:

1.       Remove ByteBuffer.allocateDirectAligned() and ByteBuffer.isAligned(). 
Instead, using existing APIs alignmentOffset() and alignedSlice()

2.       Use Block Size as the alignment value instead of OS page size

3.       Create a function named getBlockSize from FileStore class

4.       Implement DirectIO for Windows

5.       JTreg test passed for Windows, Linux and OS X with regarding to the 
DirectIO changes we made

Please let us know your comments and feedback. Thank you very much for your 
consideration!

Thanks,
Lucy

From: nio-dev [mailto:nio-dev-boun...@openjdk.java.net] On Behalf Of Lu, Yingqi
Sent: Sunday, November 06, 2016 9:37 AM
To: Alan Bateman <alan.bate...@oracle.com>
Cc: Kharbas, Kishor <kishor.khar...@intel.com>; David Holmes 
<david.hol...@oracle.com>; core-libs-dev@openjdk.java.net; 
nio-...@openjdk.java.net; Thomas Stüfe <thomas.stu...@gmail.com>; Kaczmarek, 
Eric <eric.kaczma...@intel.com>
Subject: Re: Proposal for adding O_DIRECT support into JDK 9

Hi Alan,

Thank you very much for your suggestion. FileStore is a better home for the 
alignment value. We will use It in our next version of the patch and update 
here for review soon.
Thanks,
Lucy

Sent from my iPhone
On Nov 6, 2016, at 9:04 AM, Alan Bateman 
<alan.bate...@oracle.com<mailto:alan.bate...@oracle.com>> wrote:
On 06/11/2016 15:51, Lu, Yingqi wrote:
Another approach might be use ioctl to get the block size and use that as the 
alignment value. I think ioctl is available on UNIX based OSes (please chime in 
if I miss any OS here) and has a similar call for Windows named 
DeviceIoControl. The request code of ioctl is different from OS to OS, but we 
could address that in the native code.

A possible approach (I think I mentioned this in one of the early mails) is to 
have FileStore expose the block size that can be use to align and size the 
buffer.

-Alan

Reply via email to