kernel - Refactor kern_sendfile()
commite7cb11ec46aea8b0515575369f26c95747b67d53
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 20 Oct 2017 19:01:43 +0000 (20 12:01 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 31 Oct 2017 17:49:47 +0000 (31 10:49 -0700)
tree0a1e871f256f56b43f3b8153277d40717bb213e3
parenteae4df8827c6d4a0674ae320ce85170ccaf651af
kernel - Refactor kern_sendfile()

* Refactor kern_sendfile() to greatly improve performance.

* Use vm_page_lookup_sbusy_try() exclusively to acquire VM pages
  to assign to the mbufs.

* Instead of holding pages in a fancy manner, just issue the
  UIO_NOCOPY / VMIO VOP_READ() in the blind and loop up.

* The VOP_READ() is still synchronous.  It is really unclear
  whether asynchronizing VOP_READ() via the pagerops would
  really improve performance verses simply implementing a
  limited number of connections per worker.  At least in
  localhost tests, we seem to be hitting a hardware memory
  bottleneck long before we hit a cpu bottleneck.
sys/kern/uipc_syscalls.c