diff options
author | Bhasker Hariharan <bhaskerh@google.com> | 2020-09-24 07:13:23 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-09-24 07:15:06 -0700 |
commit | 5d50c91c4da820220adcfe9ce0741ed1e5e9f4b7 (patch) | |
tree | f9d175241ee06af615c9d6e9541a2cbb3ec1ccc6 /pkg/sentry/fsimpl/proc/subtasks.go | |
parent | 0a232a5e8c846406f2fcc985d2223c8021bbef8c (diff) |
Change segment/pending queue to use receive buffer limits.
segment_queue today has its own standalone limit of MaxUnprocessedSegments but
this can be a problem in UnlockUser() we do not release the lock till there are
segments to be processed. What can happen is as handleSegments dequeues packets
more keep getting queued and we will never release the lock. This can keep
happening even if the receive buffer is full because nothing can read() till we
release the lock.
Further having a separate limit for pending segments makes it harder to track
memory usage etc. Unifying the limits makes it easier to reason about memory in
use and makes the overall buffer behaviour more consistent.
PiperOrigin-RevId: 333508122
Diffstat (limited to 'pkg/sentry/fsimpl/proc/subtasks.go')
0 files changed, 0 insertions, 0 deletions