summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2019-05-10 13:36:56 -0700
committerShentubot <shentubot@google.com>2019-05-10 13:37:48 -0700
commit5ee8218483ce172400c21780d5dbc1ec2ba54d63 (patch)
tree94aa884f856324a8b82669358cc4ca9309cc3efa /pkg/sentry/kernel
parent1bee43be13549b01e18d87df194ac219845de5cf (diff)
Add pgalloc.DelayedEvictionManual.
PiperOrigin-RevId: 247667272 Change-Id: I16b04e11bb93f50b7e05e888992303f730e4a877
Diffstat (limited to 'pkg/sentry/kernel')
-rw-r--r--pkg/sentry/kernel/kernel.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/sentry/kernel/kernel.go b/pkg/sentry/kernel/kernel.go
index 91889b573..85d73ace2 100644
--- a/pkg/sentry/kernel/kernel.go
+++ b/pkg/sentry/kernel/kernel.go
@@ -304,10 +304,11 @@ func (k *Kernel) SaveTo(w io.Writer) error {
defer k.resumeTimeLocked()
// Evict all evictable MemoryFile allocations.
- k.mf.FlushEvictions()
+ k.mf.StartEvictions()
+ k.mf.WaitForEvictions()
// Flush write operations on open files so data reaches backing storage.
- // This must come after k.mf.FlushEvictions() since eviction may cause file
+ // This must come after MemoryFile eviction since eviction may cause file
// writes.
if err := k.tasks.flushWritesToFiles(ctx); err != nil {
return err