*Linux zero copy related materials (to be browsed and studied)

Posted Jun 15, 20202 min read

Zero copy technology related:

  1. [In-depth introduction to Linux]Zero copy technology sendfile

    1. The principle of traditional IO

    2. Disadvantages of traditional IO

    3. Why do we need zero-copy technology?

    4. What is zero copy technology?

      Zero copy technology classification
      The zero copy technology in Linux mainly includes the following types:

      Direct I/O

      Three. Sendfile principle of zero copy

    5. sendfile with DMA collect copy function
      V. Summary

      Comparison of the above two kinds of I/O operations:

      1. Traditional I/O
        Hard disk >kernel buffer >user buffer >kernel socket buffer >protocol engine

      2. sendfile
        Hard disk >kernel buffer >kernel socket buffer >protocol engine

      3. sendfile(DMA collection copy)
        Hard disk >kernel buffer >protocol engine

    6. Reference materials

  2. sendfile:"Zero Copy" in Linux
    What is "zero copy"
    in conclusion

  3. Zero copy and sendfile

    1. What is "zero copy"
  4. In-depth analysis of mmap:what is why how to use performance summary
    mmap basic concepts
    mmap memory mapping principle
    The difference between mmap and conventional file operations
    Summary of mmap advantages
    mmap related functions
    mmap usage details
    Performance summary

  5. Analysis of Zero Copy Technology in Linux
    What is zero copy technology
    Allow data transmission without going through user space
    Use mmap#####

     Avoid problems:when the file is truncated by another process, the write system call will be terminated by the SIGBUS signal due to access to an illegal address;(SIGBUS signal:access to the memory cache of the closed file)
     1). Establish signal processing program for SIGBUS signal
     2). Use file rent lock

    Use sendfile##### Starting with the 2.1 kernel, Linux introduced sendfile to simplify operations:

    Use splice#####