Announcement

Collapse
No announcement yet.

NVMe "Simple Copy" Offloaded Copy Support Being Prepared For The Linux Kernel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by atomsymbol View Post
    I don't understand the point of your post.
    Even if you had to process part of the copy with actual copying/writing, any page-aligned subset of that copy operation can be done entirely through the pagetables.

    Comment


    • #12
      Originally posted by microcode View Post
      Even if you had to process part of the copy with actual copying/writing, any page-aligned subset of that copy operation can be done entirely through the pagetables.
      Yes. But if the pagetables aren't stored in some special kind of area on the SSD then any modification to the page table will result in writing a whole SSD block (SSD block size is from 256 KB to 4 MB). If NVMe-simple-copy is moving less than 256KB-4MB of data (such as: less than 4 MB per second) it does not matter from performance perspective whether it is implemented (A) just via page table modifications or (B) via additionally copying the data to an unused SSD block. Several gigabytes of data via NVMe-simple-copy would need to be moved in order to see a performance difference between (A) and (B).

      Comment


      • #13
        Originally posted by atomsymbol View Post
        Yes. But if the pagetables aren't stored in some special kind of area on the SSD then any modification to the page table will result in writing a whole SSD block (SSD block size is from 256 KB to 4 MB). If NVMe-simple-copy is moving less than 256KB-4MB of data (such as: less than 4 MB per second) it does not matter from performance perspective whether it is implemented (A) just via page table modifications or (B) via additionally copying the data to an unused SSD block. Several gigabytes of data via NVMe-simple-copy would need to be moved in order to see a performance difference between (A) and (B).
        That's a pretty bold claim, I don't think the breakeven would be that high, if the pagetable mechanism were designed with this in mind.

        Comment


        • #14
          Originally posted by microcode View Post
          That's a pretty bold claim, I don't think the breakeven would be that high, if the pagetable mechanism were designed with this in mind.
          Just a note: There exists for example the copy_file_range() syscall in Linux, but in reality most file copy operations are using the read&write syscalls. This basically means that NVMe-simple-copy won't be beneficial to most kinds of real-world file copy operations. Running "strace /bin/cp file1 file2" yields:

          Code:
          openat() = 3
          fstat(3) = 0
          openat() = 4
          fstat(4) = 0
          fadvise64(3) = 0
          read(3, 131072) = 8477   <<<<
          write(4, 8477) = 8477   <<<<
          read(3, 131072) = 0
          fchmod(4) = 0
          flistxattr(3) = 0
          flistxattr(3) = 0
          fchmod(4, 0400) = 0
          fgetxattr(3) = -1 ENODATA
          fstat(3) = 0
          fsetxattr(4) = 0
          close(4) = 0
          close(3) = 0
          which uses the read&write syscalls to copy the file.

          In summary: The real-world impact of NVMe-simple-copy outside of a small number of special cases is (currently) very limited.

          Comment


          • #15
            Originally posted by atomsymbol View Post

            Just a note: There exists for example the copy_file_range() syscall in Linux, but in reality most file copy operations are using the read&write syscalls. This basically means that NVMe-simple-copy won't be beneficial to most kinds of real-world file copy operations. Running "strace /bin/cp file1 file2" yields:

            Code:
            openat() = 3
            fstat(3) = 0
            openat() = 4
            fstat(4) = 0
            fadvise64(3) = 0
            read(3, 131072) = 8477 <<<<
            write(4, 8477) = 8477 <<<<
            read(3, 131072) = 0
            fchmod(4) = 0
            flistxattr(3) = 0
            flistxattr(3) = 0
            fchmod(4, 0400) = 0
            fgetxattr(3) = -1 ENODATA
            fstat(3) = 0
            fsetxattr(4) = 0
            close(4) = 0
            close(3) = 0
            which uses the read&write syscalls to copy the file.

            In summary: The real-world impact of NVMe-simple-copy outside of a small number of special cases is (currently) very limited.
            Well yes, I'm talking about my application which has its own on-disk format.

            Comment

            Working...
            X