summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2019-06-06 16:26:00 -0700
committerShentubot <shentubot@google.com>2019-06-06 16:27:55 -0700
commita26043ee53a2f38b81c9eaa098d115025e87f4c3 (patch)
tree666132f75a64348ca56628d635a7fc427ebc80d9 /runsc/boot
parent93aa7d11673392ca51ba69122ff5fe1aad7331b9 (diff)
Implement reclaim-driven MemoryFile eviction.
PiperOrigin-RevId: 251950660
Diffstat (limited to 'runsc/boot')
-rw-r--r--runsc/boot/loader.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go
index a997776f8..ef4ccd0bd 100644
--- a/runsc/boot/loader.go
+++ b/runsc/boot/loader.go
@@ -424,6 +424,9 @@ func createMemoryFile() (*pgalloc.MemoryFile, error) {
return nil, fmt.Errorf("error creating memfd: %v", err)
}
memfile := os.NewFile(uintptr(memfd), memfileName)
+ // We can't enable pgalloc.MemoryFileOpts.UseHostMemcgPressure even if
+ // there are memory cgroups specified, because at this point we're already
+ // in a mount namespace in which the relevant cgroupfs is not visible.
mf, err := pgalloc.NewMemoryFile(memfile, pgalloc.MemoryFileOpts{})
if err != nil {
memfile.Close()