Proposal for adding O_DIRECT support into JDK 9
Lu, Yingqi
yingqi.lu at intel.com
Fri Sep 15 22:45:01 UTC 2017
Hi Brian,
For the first issue, I do not see it on my CentOS box. However, I see other people discuss the issue online.
Could you please replace the line 78 in jdk/test/java/nio/channels/FileChannel/directio/libDirectIO.c with the following line and give it a try on your Ubuntu box? I tested it on my CentOS system, it does not complain.
int fd = open(path, 'r', 0600);
At the same time, I am working on the rest of the issues.
Thanks,
Lucy
From: Lu, Yingqi
Sent: Friday, September 15, 2017 3:29 PM
To: 'Brian Burkhalter' <brian.burkhalter at oracle.com>
Cc: Alan Bateman <Alan.Bateman at oracle.com>; nio-dev at openjdk.java.net
Subject: RE: Proposal for adding O_DIRECT support into JDK 9
Hi Brian,
I will look into all the issues. Thank you very much running all these tests.
Thanks,
Lucy
From: Brian Burkhalter [mailto:brian.burkhalter at oracle.com]
Sent: Friday, September 15, 2017 3:19 PM
To: Lu, Yingqi <yingqi.lu at intel.com<mailto:yingqi.lu at intel.com>>
Cc: Alan Bateman <Alan.Bateman at oracle.com<mailto:Alan.Bateman at oracle.com>>; nio-dev at openjdk.java.net<mailto:nio-dev at openjdk.java.net>
Subject: Re: Proposal for adding O_DIRECT support into JDK 9
Hi Lucy,
I've not re-examined the patch yet but I ran some tests.
I observed some problems on my system. When I do 'make test-image-jdk-jtreg-native' in the repo root directory in my Ubuntu 16.04 64-bit VM, I get this error:
In file included from /usr/include/fcntl.h:289:0,
from /home/bpb/Work/jdk10-dev/jdk/test/java/nio/channels/FileChannel/directio/libDirectIO.c:28:
In function 'open',
inlined from 'Java_DirectIOTest_isFileInCache0' at /home/bpb/Work/jdk10-dev/jdk/test/java/nio/channels/FileChannel/directio/libDirectIO.c:74:9:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
__open_missing_mode ();
On macOS native I get a failure for ReadDirect:
java.lang.NumberFormatException: For input string: "aa"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.base/java.lang.Integer.parseInt(Integer.java:652)
at java.base/java.lang.Integer.parseInt(Integer.java:770)
at ReadDirect.testWithArrayOfBuffer(ReadDirect.java:203)
at ReadDirect.main(ReadDirect.java:262)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:230)
at java.base/java.lang.Thread.run(Thread.java:844)
In my Windows 7 64-bit VM all four read/write direct I/O tests pass.
The foregoing results were on my own system, as mentioned.
In a job run through our regression test harness I see that the four read/write direct I/O tests are all failing on Solaris. The initTests() methods in these tests check on Solaris whether the file system type supports direct I/O and return but this verification is not propagated to the main() which continues. Probably you should instead call DirectIOTest.isDirectIOSupportedByFS() in each of these four tests and check the return value and if false the test should return as if it had succeeded.
Also in the regression run it looks as if all four read/write tests passed on Windows but the harness flagged them as failed with the message " failed to clean up files after test" but I think that this could be a problem in the harness as I do not see this in my local VM tests.
In the regression run DirectIOTest fails on all the Unix platforms but this is because the nativepath is not set on jtreg. I do not as yet know how to make this work in the automatic test runs but that is not your problem.
Thanks,
Brian
On Sep 15, 2017, at 11:00 AM, Lu, Yingqi <yingqi.lu at intel.com<mailto:yingqi.lu at intel.com>> wrote:
Please find version 14 of the patch is available athttp://cr.openjdk.java.net/~kkharbas/8164900/webrev.14/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20170915/5a4e55af/attachment-0001.html>
More information about the nio-dev
mailing list