diff options
author | Michael Pratt <mpratt@google.com> | 2018-07-16 18:18:06 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-07-16 18:19:01 -0700 |
commit | 14d06064d26b1cd9e2ccad08ebe997e704092eb8 (patch) | |
tree | ef22fe6e69d29871a85dc93642514ddc7fde9985 /pkg/sentry/syscalls/linux/sys_rlimit.go | |
parent | 8f21c0bb2807888d812318def43c2405c9b13f5a (diff) |
Start allocation and reclaim scans only where they may find a match
If usageSet is heavily fragmented, findUnallocatedRange and findReclaimable
can spend excessive cycles linearly scanning the set for unallocated/free
pages.
Improve common cases by beginning the scan only at the first page that could
possibly contain an unallocated/free page. This metadata only guarantees that
there is no lower unallocated/free page, but a scan may still be required
(especially for multi-page allocations).
That said, this heuristic can still provide significant performance
improvements for certain applications.
PiperOrigin-RevId: 204841833
Change-Id: Ic41ad33bf9537ecd673a6f5852ab353bf63ea1e6
Diffstat (limited to 'pkg/sentry/syscalls/linux/sys_rlimit.go')
0 files changed, 0 insertions, 0 deletions