summaryrefslogtreecommitdiffhomepage
path: root/LICENSE
diff options
context:
space:
mode:
authorBhasker Hariharan <bhaskerh@google.com>2020-03-19 07:18:47 -0700
committergVisor bot <gvisor-bot@google.com>2020-03-19 07:19:58 -0700
commite9e399c25d4fcad2adfe92d73b192b9784774964 (patch)
treeb1743463c7418efe7118a6bced204d667edeb86b /LICENSE
parent3a42638a0b32ceede66d8d593609b424bbdba47e (diff)
Remove workMu from tcpip.Endpoint.
workMu is removed and e.mu is now a mutex that supports TryLock. The packet processing path tries to lock the mutex and if its locked it will just queue the packet and move on. The endpoint.UnlockUser() will process any backlog of packets before unlocking the socket. This simplifies the locking inside tcp endpoints a lot. Further the endpoint.LockUser() implements spinning as long as the lock is not held by another syscall goroutine. This ensures low latency as not spinning leads to the task thread being put to sleep if the lock is held by the packet dispatch path. This is suboptimal as the lower layer rarely holds the lock for long so implementing spinning here helps. If the lock is held by another task goroutine then we just proceed to call LockUser() and the task could be put to sleep. The protocol goroutines themselves just call e.mu.Lock() and block if the lock is currently not available. Updates #231, #357 PiperOrigin-RevId: 301808349
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions