Proposal for adding O_DIRECT support into JDK 9

Lu, Yingqi yingqi.lu at intel.com
Tue Sep 5 22:27:17 UTC 2017


Hi Brain,

Based on the recent feedback I receive, I am going to make following changes into the next version of the patch. Please let me know if there is anything missing or not correctly understood.


1.     Apply Volker's updated patch for AIX DirectIO support.

2.     Add 2 static functions inside IOUtil.java for position check and remaining buffer size check. Change IOUtil.java and FileChannelImpl.java accordingly.

3.     Put Solaris Filesystem check into DirectIOTest.java and use it for all the existing tests.

4.     Add 1 additional test for both read and write to test buffer location alignment.

5.     Add 1 test case into ReadDirect test represent the case file size is smaller than block size.

6.     Remove 4096 from all the tests and replace it with a meaningful variable.

7.     Change the function name inside the tests to be more meaningful.
Please let me know if there is anything missing.
Thanks,
Lucy

From: Brian Burkhalter [mailto:brian.burkhalter at oracle.com]
Sent: Tuesday, September 05, 2017 2:06 PM
To: huaming.li at oracle.com
Cc: Lu, Yingqi <yingqi.lu at intel.com>; nio-dev at openjdk.java.net
Subject: Re: Proposal for adding O_DIRECT support into JDK 9

On Sep 4, 2017, at 8:44 PM, huaming.li at oracle.com<mailto:huaming.li at oracle.com> wrote:


Maybe we need to add some comments in the test, I'm not sure if @intermittent is needed to be added into test. So when test fails in the future, it can be analyzed quickly.

I don't know that it's a good idea to add @intermittent until we know that it is so.


               I can add tests for case 1. I think other cases are covered with the existing tests. Please let me know if I missed anything though.
The major reason I asked above several questions is that direct io works a little different from non-direct io, but currently we don't have a java doc to state this behavior difference, I think it would be helpful for direct io end users if we do so, but I'm not sure where to add this java doc, and how detailed it should be.

I think that the javadoc of ExtendedOpenOption#DIRECT is sufficient. We are assuming that users of this feature are advanced and know how direct I/O works and how to use it. I don't know that we need to weigh down the documentation with too many details.

Thanks,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20170905/e25f1bee/attachment-0001.html>


More information about the nio-dev mailing list