RE: Proposal for adding O_DIRECT support into JDK 9

2016-11-16 Thread Lu, Yingqi
; core-libs-dev@openjdk.java.net; nio-...@openjdk.java.net; Thomas Stüfe ; Kaczmarek, Eric Subject: Re: Proposal for adding O_DIRECT support into JDK 9 Hi Alan, 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

Re: Proposal for adding O_DIRECT support into JDK 9

2016-11-07 Thread Thomas Stüfe
On Sun, Nov 6, 2016 at 6:04 PM, Alan Bateman 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 simil

Re: Proposal for adding O_DIRECT support into JDK 9

2016-11-06 Thread Lu, Yingqi
Hi Alan, 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. Thanks, Lucy Sent from my iPhone On Nov 6, 2016, at 9:04 AM, Alan Bateman mailto:alan.bate...@oracle.com>> wro

Re: Proposal for adding O_DIRECT support into JDK 9

2016-11-06 Thread Alan Bateman
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

RE: Proposal for adding O_DIRECT support into JDK 9

2016-11-06 Thread Lu, Yingqi
@openjdk.java.net; Kharbas, Kishor Subject: Re: Proposal for adding O_DIRECT support into JDK 9 On Sat, Nov 5, 2016 at 6:42 PM, David Holmes mailto:david.hol...@oracle.com>> wrote: Hi Paul, On 5/11/2016 2:58 AM, Paul Sandoz wrote: Hi Lucy, I am struggling to find an entirely satisfactory locat

Re: Proposal for adding O_DIRECT support into JDK 9

2016-11-06 Thread Thomas Stüfe
gt;> >>> From: Paul Sandoz [mailto:paul.san...@oracle.com] >>> Sent: Thursday, November 03, 2016 12:46 PM >>> To: Peter Levart >>> Cc: Lu, Yingqi ; Alan Bateman < >>> alan.bate...@oracle.com>; nio-...@openjdk.java.net; Kaczmarek, Eric < >>&g

RE: Proposal for adding O_DIRECT support into JDK 9

2016-11-05 Thread Lu, Yingqi
yd ; Paul Sandoz >; Lu, Yingqi >Cc: nio-...@openjdk.java.net; Kaczmarek, Eric ; >core-libs-dev@openjdk.java.net; Kharbas, Kishor >Subject: Re: Proposal for adding O_DIRECT support into JDK 9 > >On 04/11/2016 18:32, David M. Lloyd wrote: > >> I still feel like it could be

Re: Proposal for adding O_DIRECT support into JDK 9

2016-11-05 Thread David Holmes
@openjdk.java.net; Kharbas, Kishor Subject: Re: Proposal for adding O_DIRECT support into JDK 9 Hi Peter, Thanks for pointing this out, you beat me to it :-) Note that the alignment for a unit size corresponding to page size will only be stable for direct byte buffers, since for heap byte

Re: Proposal for adding O_DIRECT support into JDK 9

2016-11-05 Thread Alan Burlison
On 04/11/2016 18:32, David M. Lloyd wrote: I still feel like it could be a problem to have just one simple getPageSize method, given how many CPU architectures and OSes support multiple page sizes. Yes. $ pagesize -a 8192 65536 4194304 268435456 2147483648 -- Alan Burlison --

Re: Proposal for adding O_DIRECT support into JDK 9

2016-11-04 Thread David M. Lloyd
e and consideration! Thanks, Lucy -Original Message- From: Alan Bateman [mailto:alan.bate...@oracle.com] Sent: Monday, October 17, 2016 7:59 AM To: Lu, Yingqi Cc: nio-...@openjdk.java.net; Kaczmarek, Eric ; Kharbas, Kishor Subject: Re: Proposal for adding O_DIRECT support into JDK 9 On

RE: Proposal for adding O_DIRECT support into JDK 9

2016-11-04 Thread Lu, Yingqi
Eric >; core-libs-dev@openjdk.java.net; Kharbas, Kishor > >Subject: Re: Proposal for adding O_DIRECT support into JDK 9 > >Hi Lucy, > >I am struggling to find an entirely satisfactory location to place a method >such as >getPageSize, but java.lang.Runtime seems less w

Re: Proposal for adding O_DIRECT support into JDK 9

2016-11-04 Thread Paul Sandoz
> Cc: Lu, Yingqi ; Alan Bateman ; > nio-...@openjdk.java.net; Kaczmarek, Eric ; > core-libs-dev@openjdk.java.net; Kharbas, Kishor > Subject: Re: Proposal for adding O_DIRECT support into JDK 9 > > Hi Peter, > > Thanks for pointing this out, you beat me to it :-) > > Note that

Re: Proposal for adding O_DIRECT support into JDK 9

2016-11-04 Thread Jon V.
gt; 7. We did jtreg test for the entire nio package and no errors were found >> due to our changes. >> >> Please let us know your feedback and comment. Thank you very much for >> your time and consideration! >> >> Thanks, >> Lucy >> >> -Orig

RE: Proposal for adding O_DIRECT support into JDK 9

2016-11-03 Thread Lu, Yingqi
, Yingqi ; Alan Bateman ; nio-...@openjdk.java.net; Kaczmarek, Eric ; core-libs-dev@openjdk.java.net; Kharbas, Kishor Subject: Re: Proposal for adding O_DIRECT support into JDK 9 Hi Peter, Thanks for pointing this out, you beat me to it :-) Note that the alignment for a unit size corresponding to

Re: Proposal for adding O_DIRECT support into JDK 9

2016-11-03 Thread Paul Sandoz
back and comment. Thank you very much for your >> time and consideration! >> >> Thanks, >> Lucy >> >>> -Original Message- >>> From: Alan Bateman [mailto:alan.bate...@oracle.com >>> <mailto:alan.bate...@oracle.com>] &g

Re: Proposal for adding O_DIRECT support into JDK 9

2016-11-03 Thread Peter Levart
Lucy -Original Message- From: Alan Bateman [mailto:alan.bate...@oracle.com] Sent: Monday, October 17, 2016 7:59 AM To: Lu, Yingqi Cc: nio-...@openjdk.java.net; Kaczmarek, Eric ; Kharbas, Kishor Subject: Re: Proposal for adding O_DIRECT support into JDK 9 On 12/10/2016 17:41, Lu, Yingqi

RE: Proposal for adding O_DIRECT support into JDK 9

2016-11-03 Thread Lu, Yingqi
age- >From: David M. Lloyd [mailto:david.ll...@redhat.com] >Sent: Thursday, November 03, 2016 5:15 AM >To: Lu, Yingqi ; Alan Bateman >Cc: nio-...@openjdk.java.net; Kharbas, Kishor ; >core-libs-dev@openjdk.java.net; Kaczmarek, Eric >Subject: Re: Proposal for adding O_DIRECT suppo

RE: Proposal for adding O_DIRECT support into JDK 9

2016-11-03 Thread Lu, Yingqi
: David M. Lloyd Cc: Lu, Yingqi ; Alan Bateman ; nio-...@openjdk.java.net; Kaczmarek, Eric ; core-libs-dev@openjdk.java.net; Kharbas, Kishor Subject: Re: Proposal for adding O_DIRECT support into JDK 9 Why not call aligned_alloc for doing page alignment? It should waste much less memory. http

Re: Proposal for adding O_DIRECT support into JDK 9

2016-11-03 Thread David M. Lloyd
riginal Message- From: Alan Bateman [mailto:alan.bate...@oracle.com] Sent: Monday, October 17, 2016 7:59 AM To: Lu, Yingqi Cc: nio-...@openjdk.java.net; Kaczmarek, Eric ; Kharbas, Kishor Subject: Re: Proposal for adding O_DIRECT support into JDK 9 On 12/10/2016 17:41, Lu, Yingqi wrote: : You ar

RE: Proposal for adding O_DIRECT support into JDK 9

2016-11-02 Thread Lu, Yingqi
nio-...@openjdk.java.net; Kaczmarek, Eric ; >Kharbas, Kishor >Subject: Re: Proposal for adding O_DIRECT support into JDK 9 > >On 12/10/2016 17:41, Lu, Yingqi wrote: > >> : >> >> You are correct about the "extra copy" with DirectIO. Will it be acceptable >>

RE: Proposal for adding O_DIRECT support into JDK 9

2016-10-14 Thread Lu, Yingqi
t: Friday, October 14, 2016 1:28 AM >To: Lu, Yingqi ; Brian Burkhalter > >Cc: Kharbas, Kishor ; nio-...@openjdk.java.net; >core-libs-dev@openjdk.java.net; Kaczmarek, Eric >Subject: Re: Proposal for adding O_DIRECT support into JDK 9 > >As has been pointed out already, platforms ot

Re: Proposal for adding O_DIRECT support into JDK 9

2016-10-14 Thread Alan Burlison
As has been pointed out already, platforms other than Linux provide similar functionality, yet this proposal does not provide any support for them. Even if such support isn't added initially, the APIs added for the Linux implementation should be generic enough that direct IO support could be ad

Re: Proposal for adding O_DIRECT support into JDK 9

2016-10-13 Thread Brian Burkhalter
An interesting comparison of approaches on a Linux server and an OS X client is given here: http://adityaramesh.com/io_benchmark/ Brian On Oct 13, 2016, at 3:09 PM, e...@zusammenkunft.net wrote: > The question is, if support for fadvice() would be more flexible (and > somewhat saner). > > An

RE: Proposal for adding O_DIRECT support into JDK 9

2016-10-13 Thread Lu, Yingqi
t;Subject: Re: Proposal for adding O_DIRECT support into JDK 9 > >On 06/10/2016 00:31, Brian Burkhalter wrote: > >> Given that the functionality of O_DIRECT on Linux appears to be >> supported by other interfaces on OS X, Solaris, and Windows, I wonder >> whether the patch w

Re: Proposal for adding O_DIRECT support into JDK 9

2016-10-13 Thread ecki
; Kaczmarek, Eric; core-libs-dev@openjdk.java.net; Kharbas, Kishor Betreff: Re: Proposal for adding O_DIRECT support into JDK 9 On 06/10/2016 00:31, Brian Burkhalter wrote: > Given that the functionality of O_DIRECT on Linux appears to be > supported by other interfaces on OS X, Solaris, and Wind

Re: Proposal for adding O_DIRECT support into JDK 9

2016-10-13 Thread Alan Burlison
On 06/10/2016 00:31, Brian Burkhalter wrote: Given that the functionality of O_DIRECT on Linux appears to be supported by other interfaces on OS X, Solaris, and Windows, I wonder whether the patch will need to be refactored in some way to accommodate these other operating systems? For reference

Re: Proposal for adding O_DIRECT support into JDK 9

2016-10-05 Thread Brian Burkhalter
Hi Lucy, On Oct 4, 2016, at 5:35 PM, Lu, Yingqi wrote: > Thank you very much for reviewing the patch and providing the detailed > error/warning messages. They are very helpful! You are welcome. > We will look into the issues and solve them in the next version of the patch. > Test cases for O

RE: Proposal for adding O_DIRECT support into JDK 9

2016-10-04 Thread Lu, Yingqi
O_DIRECT support into JDK 9 Hi Lucy, On Oct 4, 2016, at 10:24 AM, Lu, Yingqi mailto:yingqi...@intel.com>> wrote: Anyone else has any feedback/comments? I looked over the 8164900-2 patch and did not see any conceptual problems per se. I did not however scrutinize all the detailed c

Re: Proposal for adding O_DIRECT support into JDK 9

2016-10-04 Thread Brian Burkhalter
Hi Lucy, On Oct 4, 2016, at 10:24 AM, Lu, Yingqi wrote: > Anyone else has any feedback/comments? I looked over the 8164900-2 patch and did not see any conceptual problems per se. I did not however scrutinize all the detailed changes, especially the more extensive ones in FileDispatcherImpl.c

RE: Proposal for adding O_DIRECT support into JDK 9

2016-10-04 Thread Lu, Yingqi
Kaczmarek, Eric > ; Kharbas, Kishor > Subject: RE: Proposal for adding O_DIRECT support into JDK 9 > > Hi All, > > Please find the most recent version of the patch available at > http://cr.openjdk.java.net/~igraves/8164900-2/ > > In this version, we have following two

RE: Proposal for adding O_DIRECT support into JDK 9

2016-10-04 Thread Langer, Christoph
Eric ; > Kharbas, Kishor > Subject: RE: Proposal for adding O_DIRECT support into JDK 9 > > Hi All, > > Please find the most recent version of the patch available at > http://cr.openjdk.java.net/~igraves/8164900-2/ > > In this version, we have following two

RE: Proposal for adding O_DIRECT support into JDK 9

2016-09-30 Thread Lu, Yingqi
; core-libs-dev@openjdk.java.net Cc: nio-...@openjdk.java.net Subject: Re: Proposal for adding O_DIRECT support into JDK 9 On 26/09/2016 19:50, Lu, Yingqi wrote: > Alan, you mean readv0/write0 or read0/write0? I just want to make sure > :-) Apologies, I meant each of the native methods whe

RE: Proposal for adding O_DIRECT support into JDK 9

2016-09-27 Thread Lu, Yingqi
: nio-...@openjdk.java.net Subject: Re: Proposal for adding O_DIRECT support into JDK 9 On 26/09/2016 19:50, Lu, Yingqi wrote: > Alan, you mean readv0/write0 or read0/write0? I just want to make sure > :-) Apologies, I meant each of the native methods where the decision to use direct I/O

Re: Proposal for adding O_DIRECT support into JDK 9

2016-09-27 Thread Alan Bateman
On 26/09/2016 19:50, Lu, Yingqi wrote: Alan, you mean readv0/write0 or read0/write0? I just want to make sure :-) Apologies, I meant each of the native methods where the decision to use direct I/O or not would be a lot more maintainable in Java. You'll see that there are already code paths for

RE: Proposal for adding O_DIRECT support into JDK 9

2016-09-26 Thread Lu, Yingqi
O_DIRECT, we can modify that for sure. Thanks, Lucy -Original Message- From: Alan Bateman [mailto:alan.bate...@oracle.com] Sent: Monday, September 26, 2016 11:42 AM To: Lu, Yingqi ; core-libs-dev@openjdk.java.net Cc: nio-...@openjdk.java.net Subject: Re: Proposal for adding O_DIRECT support

Re: Proposal for adding O_DIRECT support into JDK 9

2016-09-26 Thread Alan Bateman
On 26/09/2016 19:17, Lu, Yingqi wrote: Hi All, The second version of the patch is now available at http://cr.openjdk.java.net/~igraves/8164900-1/. In this version, we moved the O_DIRECT support from FIS/FOS/RAF to FileChannel. We implemented O_DIRECT as a StandardOpenOption. The reason we d

RE: Proposal for adding O_DIRECT support into JDK 9

2016-09-26 Thread Lu, Yingqi
Message- From: core-libs-dev [mailto:core-libs-dev-boun...@openjdk.java.net] On Behalf Of Lu, Yingqi Sent: Saturday, August 27, 2016 9:01 AM To: Alan Bateman Cc: core-libs-dev@openjdk.java.net; Kaczmarek, Eric Subject: Re: Proposal for adding O_DIRECT support into JDK 9 The workload we have

RE: Proposal for adding O_DIRECT support into JDK 9

2016-08-28 Thread Lu, Yingqi
] Sent: Sunday, August 28, 2016 3:30 AM To: 'Andrew Haley' ; Lu, Yingqi ; core-libs-dev@openjdk.java.net Cc: Kaczmarek, Eric Subject: RE: Proposal for adding O_DIRECT support into JDK 9 Hi, IMHO, I'd stay with FOS/FIS/RAF completely out of this business and not change them anymore. T

RE: Proposal for adding O_DIRECT support into JDK 9

2016-08-28 Thread Uwe Schindler
.java.net > Cc: Kaczmarek, Eric > Subject: Re: Proposal for adding O_DIRECT support into JDK 9 > > On 26/08/16 23:31, Lu, Yingqi wrote: > > > The proposal adds 4 API methods to java/io/FileInputStream.java, > > java/io/OutputStream.java to enable the feature. In addition

Re: Proposal for adding O_DIRECT support into JDK 9

2016-08-28 Thread Andrew Haley
On 26/08/16 23:31, Lu, Yingqi wrote: > The proposal adds 4 API methods to java/io/FileInputStream.java, > java/io/OutputStream.java to enable the feature. In addition, it add > O_DIRECT with two more modes "ro" (read-only and direct) and "rwo" > (read-write and direct) to java/io/RandomAccessFile.

Re: Proposal for adding O_DIRECT support into JDK 9

2016-08-27 Thread Lu, Yingqi
ote: > >> On 26/08/2016 23:31, Lu, Yingqi wrote: >> >> Dear All, >> >> This is a proposal for adding O_DIRECT support into JDK 9 for >> reading/writing from/to a file on Linux platform. O_DIRECT is a file-open >> flag to pass to OPEN (2). It tries to m

Re: Proposal for adding O_DIRECT support into JDK 9

2016-08-27 Thread Alan Bateman
On 26/08/2016 23:31, Lu, Yingqi wrote: Dear All, This is a proposal for adding O_DIRECT support into JDK 9 for reading/writing from/to a file on Linux platform. O_DIRECT is a file-open flag to pass to OPEN (2). It tries to minimize cache effects of the I/O to and from this file. File I/O is

Proposal for adding O_DIRECT support into JDK 9

2016-08-26 Thread Lu, Yingqi
Dear All, This is a proposal for adding O_DIRECT support into JDK 9 for reading/writing from/to a file on Linux platform. O_DIRECT is a file-open flag to pass to OPEN (2). It tries to minimize cache effects of the I/O to and from this file. File I/O is done directly to/from user-space buffers