Usage of direct IO with virtual threads

Andrey Lomakin andrey.lomakin at jetbrains.com
Sat Jul 9 16:28:41 UTC 2022


Thank you for your reply.
Is there any issue which I can follow to track state of such refactoring ?

On Sat, Jul 9, 2022, 18:24 Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 09/07/2022 13:49, Andrey Lomakin wrote:
> > Hi guys.
> >
> > Could you clarify is it OK to
> > use com.sun.nio.file.ExtendedOpenOption#DIRECT  open option with
> > virtual threads or in other words, will reading/writing to the file
> > which uses direct IO be converted into the non-blocking call ?
> >
> > And second question, what is the general status of integration of
> > FileChannel API with virtual threads
>
> You can use direct I/O, "force", or any other FileChannel method from
> virtual threads. Right now they pin the thread but they increase
> parallelism for the duration of the I/O operation so the temporary
> pinning should be mostly transparent. In time they make make use of
> io_uring and other facilities but there is significantly low level
> refactoring require before that will plug in, so not JDK 19.
>
> -Alan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20220709/e3d18467/attachment.htm>


More information about the loom-dev mailing list