summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2021-10-28 16:52:28 -0700
committergVisor bot <gvisor-bot@google.com>2021-10-28 16:55:58 -0700
commitca55c18a31789b8f2541d5d3b90e2af012d3e6ef (patch)
treee9feee82ceaf8ae00708bf4c9cf6826075ae226f /pkg/tcpip
parentd350c95b04d594abedaad1846f35304b55194e84 (diff)
Use Task blocking timer for nanosleep(2).
kernel/time.Timer allocation is expensive and not sync.Poolable (since time.Timer only supports notification through a channel, requiring a goroutine to receive from the channel, and sync.Pool doesn't invoke any kind of cleanup on discarded items in the pool so it would leak timer goroutines). Using the existing Task.blockingTimer for nanosleep(), and applicable cases in clock_nanosleep(), at least avoids Timer allocation in common cases. PiperOrigin-RevId: 406248394
Diffstat (limited to 'pkg/tcpip')
0 files changed, 0 insertions, 0 deletions