summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/read.cc
diff options
context:
space:
mode:
authorBhasker Hariharan <bhaskerh@google.com>2019-08-14 14:33:11 -0700
committergVisor bot <gvisor-bot@google.com>2019-08-14 14:34:27 -0700
commit570fb1db6b4e01be37386a379fea4d63e5a3cdc2 (patch)
tree44cd127ffaa546b3f0c9bc1b642fe8980e69bbd9 /test/syscalls/linux/read.cc
parentcee044c2ab009c9faae154e1751eef93430fc141 (diff)
Improve SendMsg performance.
SendMsg before this change would copy all the data over into a new slice even if the underlying socket could only accept a small amount of data. This is really inefficient with non-blocking sockets and under high throughput where large writes could get ErrWouldBlock or if there was say a timeout associated with the sendmsg() syscall. With this change we delay copying bytes in till they are needed and only copy what can be potentially sent/held in the socket buffer. Reducing the need to repeatedly copy data over. Also a minor fix to change state FIN-WAIT-1 when shutdown(..., SHUT_WR) is called instead of when we transmit the actual FIN. Otherwise the socket could remain in CONNECTED state even though the user has called shutdown() on the socket. Updates #627 PiperOrigin-RevId: 263430505
Diffstat (limited to 'test/syscalls/linux/read.cc')
0 files changed, 0 insertions, 0 deletions