[arvados] updated: 2.7.0-6112-g7890e45a18

git repository hosting git at public.arvados.org
Sat Mar 9 16:34:18 UTC 2024


Summary of changes:
 services/fuse/arvados_fuse/__init__.py | 16 +++++++++++++++-
 services/fuse/arvados_fuse/command.py  |  2 +-
 2 files changed, 16 insertions(+), 2 deletions(-)

       via  7890e45a180760b351bb0eb3ea7a237094f24ec1 (commit)
      from  bea14966e8b30871dc2d417f98fa95d3faf963ea (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 7890e45a180760b351bb0eb3ea7a237094f24ec1
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Sat Mar 9 11:33:21 2024 -0500

    21541: Don't keep try to evict inodes that don't count against cache
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/services/fuse/arvados_fuse/__init__.py b/services/fuse/arvados_fuse/__init__.py
index e1334552f8..193da88038 100644
--- a/services/fuse/arvados_fuse/__init__.py
+++ b/services/fuse/arvados_fuse/__init__.py
@@ -162,7 +162,9 @@ class InodeCache(object):
         for ent in listvalues(self._cache_entries):
             if self._total < self.cap or len(self._cache_entries) < self.min_entries:
                 break
-            yield ent
+            if ent.cache_size > 0:
+                # if cache_size is zero it's been cleared already
+                yield ent
 
     def manage(self, obj):
         if obj.inode in self._cache_entries:
@@ -288,6 +290,8 @@ class Inodes(object):
                 locked_ops.clear()
 
                 entry = self._inode_remove_queue.get(True)
+                if entry is None:
+                    return
                 # Process this entry
                 _logger.debug("_inode_remove %s", entry)
                 self._inode_op(entry, locked_ops)
@@ -296,6 +300,8 @@ class Inodes(object):
                 while True:
                     try:
                         entry = self._inode_remove_queue.get(False)
+                        if entry is None:
+                            return
                         _logger.debug("_inode_remove %s", entry)
                         self._inode_op(entry, locked_ops)
                     except queue.Empty:
@@ -348,6 +354,10 @@ class Inodes(object):
                 # entry but wipe out the stuff under it
                 forget_inode = False
 
+            if entry.cache_size == 0 and not forget_inode:
+                # Was cleared already
+                return
+
             if forget_inode:
                 self.inode_cache.unmanage(entry)
 
@@ -384,6 +394,10 @@ class Inodes(object):
             self._inode_remove_queue.put(("invalidate_entry", entry.inode, native(name.encode(self.encoding))))
 
     def clear(self):
+        self._inode_remove_queue.put(None)
+        with llfuse.lock_released:
+            self._inode_remove_thread.join()
+
         self.inode_cache.clear()
 
         for k,v in viewitems(self._entries):
diff --git a/services/fuse/arvados_fuse/command.py b/services/fuse/arvados_fuse/command.py
index 7c193bbb9f..715096fc2c 100644
--- a/services/fuse/arvados_fuse/command.py
+++ b/services/fuse/arvados_fuse/command.py
@@ -472,7 +472,7 @@ From here, the following directories are available:
 
     def _llfuse_main(self):
         try:
-            llfuse.main(workers=8)
+            llfuse.main(workers=10)
         except:
             llfuse.close(unmount=False)
             raise

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list