On Wed, Feb 22, 2017 at 2:42 PM, Jacob Champion <[email protected]> wrote:
> Ah, but they *do*, as Yann pointed out earlier. We can't just deliver the > disk cache to OpenSSL for encryption; it has to be copied into some > addressable buffer somewhere. That seems to be a major reason for the > mmap() advantage, compared to a naive read() solution that just reads into > a small buffer over and over again. > IOW: read():Three copies: copy from filesystem cache to httpd read() buffer to encrypted-data buffer to kernel socket buffer. mmap(): Two copies: filesystem page already mapped into httpd, so just copy from filesystem (cached) page to encrypted-data buffer to kernel socket buffer.
