Proposal for adding O_DIRECT support into JDK 9

Lu, Yingqi yingqi.lu at intel.com
Thu Sep 7 19:41:59 UTC 2017


I tested your patch and it works on both MacOS and Linux both. I will include it in the next version of the patch.

Please also let me know if you see anything missing from the build+regession test.

Thank you very much for your help!

Thanks,
Lucy

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

Hi Lucy,

On Sep 6, 2017, at 11:38 AM, Lu, Yingqi <yingqi.lu at intel.com<mailto:yingqi.lu at intel.com>> wrote:


The webrev.08 is available at http://cr.openjdk.java.net/~kkharbas/8164900/webrev.08/

It supposes to address the following the issues. Please let me know if there is anything missing.

I was off yesterday so I need to catch up here.

On Sep 7, 2017, at 12:52 AM, huaming.li at oracle.com<mailto:huaming.li at oracle.com> wrote:

I applied the patch, face following compilation error, I worked on Mac, Darwin Kernel Version 16.7.0.

/workspace/jdk/jdk10/jdk/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java:247: error: cannot find symbol
            oflags |= O_DIRECT;
                      ^
  symbol:   variable O_DIRECT
  location: class UnixChannelFactory
The same failure occurs of course on Solaris. In the build phase it is resolved by

--- a/src/java.base/unix/classes/sun/nio/fs/UnixConstants.java.template
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixConstants.java.template
@@ -72,6 +72,9 @@


 #ifdef O_DIRECT
     static final int PREFIX_O_DIRECT = O_DIRECT;
+#else
+    // not supported (dummy values will not be used at runtime).
+    static final int PREFIX_O_DIRECT = 00;
 #endif


     static final int PREFIX_S_IAMB =

I am currently running a build+regression job on Linux, macOS, Solaris, and Windows.

Thanks,

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


More information about the nio-dev mailing list