summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/pgalloc/save_restore.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/pgalloc/save_restore.go')
-rw-r--r--pkg/sentry/pgalloc/save_restore.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/pkg/sentry/pgalloc/save_restore.go b/pkg/sentry/pgalloc/save_restore.go
index 9534d1aed..d4ba384b1 100644
--- a/pkg/sentry/pgalloc/save_restore.go
+++ b/pkg/sentry/pgalloc/save_restore.go
@@ -28,15 +28,6 @@ import (
"gvisor.googlesource.com/gvisor/pkg/state"
)
-// FlushEvictions blocks until f has finished evicting all evictable
-// allocations.
-func (f *MemoryFile) FlushEvictions() {
- f.mu.Lock()
- f.startEvictionsLocked()
- f.mu.Unlock()
- f.evictionWG.Wait()
-}
-
// SaveTo writes f's state to the given stream.
func (f *MemoryFile) SaveTo(w io.Writer) error {
// Wait for reclaim.
@@ -51,7 +42,7 @@ func (f *MemoryFile) SaveTo(w io.Writer) error {
// Ensure that there are no pending evictions.
if len(f.evictable) != 0 {
- panic(fmt.Sprintf("evictions still pending for %d users; call FlushEvictions before SaveTo", len(f.evictable)))
+ panic(fmt.Sprintf("evictions still pending for %d users; call StartEvictions and WaitForEvictions before SaveTo", len(f.evictable)))
}
// Ensure that all pages that contain data have knownCommitted set, since