Proposal for adding O_DIRECT support into JDK 9
yingqi.lu at intel.com
Wed Aug 9 22:46:09 UTC 2017
Here is our most recent version of the DirectIO patch. http://cr.openjdk.java.net/~kkharbas/8164900/webrev.05/
The feature has been enabled and tested for Windows, Linux, MacOS and Solaris.
Please review it and let us know your feedback and comments.
Thank you very much for your help!
From: Lu, Yingqi
Sent: Wednesday, November 16, 2016 2:15 PM
To: Lu, Yingqi <yingqi.lu at intel.com>; Alan Bateman <Alan.Bateman at oracle.com>
Cc: Kharbas, Kishor <kishor.kharbas at intel.com>; David Holmes <david.holmes at oracle.com>; core-libs-dev at openjdk.java.net; nio-dev at openjdk.java.net; Thomas Stüfe <thomas.stuefe at gmail.com>; Kaczmarek, Eric <eric.kaczmarek at intel.com>
Subject: RE: Proposal for adding O_DIRECT support into JDK 9
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!
From: nio-dev [mailto:nio-dev-bounces at openjdk.java.net] On Behalf Of Lu, Yingqi
Sent: Sunday, November 06, 2016 9:37 AM
To: Alan Bateman <Alan.Bateman at oracle.com<mailto:Alan.Bateman at oracle.com>>
Cc: Kharbas, Kishor <kishor.kharbas at intel.com<mailto:kishor.kharbas at intel.com>>; David Holmes <david.holmes at oracle.com<mailto:david.holmes at oracle.com>>; core-libs-dev at openjdk.java.net<mailto:core-libs-dev at openjdk.java.net>; nio-dev at openjdk.java.net<mailto:nio-dev at openjdk.java.net>; Thomas Stüfe <thomas.stuefe at gmail.com<mailto:thomas.stuefe at gmail.com>>; Kaczmarek, Eric <eric.kaczmarek at intel.com<mailto:eric.kaczmarek at intel.com>>
Subject: Re: Proposal for adding O_DIRECT support into JDK 9
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.
Sent from my iPhone
On Nov 6, 2016, at 9:04 AM, Alan Bateman <Alan.Bateman at oracle.com<mailto:Alan.Bateman at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nio-dev