Proposal for adding O_DIRECT support into JDK 9
Lu, Yingqi
yingqi.lu at intel.com
Mon Aug 28 17:32:03 UTC 2017
Hi Alan,
Thank you very much for your feedback! I will modify accordingly and send the webrev.06 here for review shortly.
Couple questions I want to make sure:
1. Regarding to DirectIO test, do you mean uploading the native library into the build? If yes, we can do that for Linux 64bit and MacOS 64bit (from a virtual machine). I will need help from the community to add libraries that support other OSes.
2. Could you please provide the line number for the comment below?
- FileChannel.read(ByteByffer[])/write(ByteBuffer[]) loop over buffers but they should only do this when direct is true.
Thanks,
Lucy
From: Alan Bateman [mailto:Alan.Bateman at oracle.com]
Sent: Monday, August 28, 2017 5:50 AM
To: Lu, Yingqi <yingqi.lu at intel.com>; Brian Burkhalter <brian.burkhalter at oracle.com>; Markle, Seth <smarkle at amazon.com>
Cc: nio-dev at openjdk.java.net
Subject: Re: Proposal for adding O_DIRECT support into JDK 9
On 25/08/2017 17:38, Lu, Yingqi wrote:
Dear All,
Please let us know if you have any additional feedback or questions on this patch.
Patch is available at http://cr.openjdk.java.net/~kkharbas/8164900/webrev.05/<http://cr.openjdk.java.net/%7Ekkharbas/8164900/webrev.05/>
JBS link is available at https://bugs.openjdk.java.net/browse/JDK-8164900
I looked through the latest webrev and I think it's looking quite good (all the issues that we discussed previously have been addressed).
I think Brian is looking through the tests but one question on DirectIO is whether you place to convert that into a native test that is compiled in the build. It may otherwise get forgotten.
A few minor comments:
- FileStore::getBlockSize - the throws UOE can be dropped from the signature as it's unchecked (leave the @throws UOE in the javadoc of course)
- FileChannelImpl can be created without a path so it might be useful to add "assert path != null" to the direct case as we should never create a FileChannel for direct I/O but without a path.
- Minor nit but the "//" comments need a spec to be consistent with the existing comments.
- FileChannel.read(ByteByffer[])/write(ByteBuffer[]) loop over buffers but they should only do this when direct is true.
- FileDispatcher.setDirectIO - "{" can be moved up to the previous line.
I think that is all I have for now.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20170828/d83608ac/attachment.html>
More information about the nio-dev
mailing list