Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8265175

(fs) Files.copy(Path,Path,CopyOption...) should use sendfile on Linux

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 17
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b19
    • OS:
      linux

      Description

      On Unix the copy is implemented in sun.nio.fs.UnixCopyFile.copy() which calls a native method transfer(int,int,long) to perform the actual data copying. The copy is effected via a user-space buffer in a loop of read()-write() invocations. Instead of going via user-space buffers, the copy should be able to be done more efficiently using zero-copy as implemented by the Linux system call sendfile().

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bpb Brian Burkhalter
              Reporter:
              bpb Brian Burkhalter
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: