From 5ee8218483ce172400c21780d5dbc1ec2ba54d63 Mon Sep 17 00:00:00 2001 From: Jamie Liu Date: Fri, 10 May 2019 13:36:56 -0700 Subject: Add pgalloc.DelayedEvictionManual. PiperOrigin-RevId: 247667272 Change-Id: I16b04e11bb93f50b7e05e888992303f730e4a877 --- pkg/sentry/kernel/kernel.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkg/sentry/kernel/kernel.go') 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 -- cgit v1.2.3