The Linux "copy problem"
The Linux "copy problem"
Posted May 29, 2019 21:38 UTC (Wed) by ewen (subscriber, #4772)In reply to: The Linux "copy problem" by desbma
Parent article: The Linux "copy problem"
The sendfile system call was my thought too.  If a copy tool used sendfile, eg, for within a file system copying then the kernel has lots more information on the high level goal with which to optimise the approach taken. And even between file systems it could potentially make use of file system internal knowledge (block layout, etc) and buffer access.
        
If copy tools just do read/write in a loop, the kernel is left guessing the high level intent (including read ahead and whether to cache it in the kernel buffers),
Ewen
 
           