]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove extra heap release
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 30 Mar 2021 03:07:25 +0000 (20:07 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 6 Apr 2021 14:10:55 +0000 (07:10 -0700)
We now regularly do this unconditionally in the MDS, see the upkeep
thread.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/MDCache.cc
src/mds/MDCache.h

index e12e6942d35a33cef5b5936fe05ab530879223a0..d48db912819e463ae47ea9b6656f1bcb7d789114 100644 (file)
@@ -320,10 +320,6 @@ void MDCache::add_inode(CInode *in)
     if (in->is_base())
       base_inodes.insert(in);
   }
-
-  if (cache_toofull()) {
-    exceeded_size_limit = true;
-  }
 }
 
 void MDCache::remove_inode(CInode *o) 
@@ -7739,20 +7735,6 @@ void MDCache::check_memory_usage()
   if (cache_toofull()) {
     mds->server->recall_client_state(nullptr, Server::RecallFlags::TRIM);
   }
-
-  // If the cache size had exceeded its limit, but we're back in bounds
-  // now, free any unused pool memory so that our memory usage isn't
-  // permanently bloated.
-  if (exceeded_size_limit && !cache_toofull()) {
-    // Only do this once we are back in bounds: otherwise the releases would
-    // slow down whatever process caused us to exceed bounds to begin with
-    if (ceph_using_tcmalloc()) {
-      dout(5) << "check_memory_usage: releasing unused space from tcmalloc"
-             << dendl;
-      ceph_heap_release_free_memory();
-    }
-    exceeded_size_limit = false;
-  }
 }
 
 
index 5c837d620c5a2712534e5f13adfd8acacdf12142..d59d406751b96e6fbd6849c5b1c519bb5bf67610 100644 (file)
@@ -1143,7 +1143,6 @@ class MDCache {
   std::unique_ptr<PerfCounters> logger;
 
   Filer filer;
-  bool exceeded_size_limit = false;
   std::array<xlist<ClientLease*>, client_lease_pools> client_leases{};
 
   /* subtree keys and each tree's non-recursive nested subtrees (the "bounds") */