21639: Tell the kernel to map in whole blocks with madvise
[arvados.git] / sdk / python / arvados / diskcache.py
index b0ae364c88d32ccc1c7a67bb6621035dc65d22e0..3749298210c3b87a5b2b89ec90d53f469c65a92f 100644 (file)
@@ -32,6 +32,8 @@ class DiskCacheSlot(object):
 
     def get(self):
         self.ready.wait()
+        if self.content is not None:
+            self.content.madvise(mmap.MADV_WILLNEED)
         return self.content
 
     def set(self, value):