]> 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)
committerNathan Cutler <ncutler@suse.com>
Tue, 4 May 2021 13:58:21 +0000 (15:58 +0200)
We now regularly do this unconditionally in the MDS, see the upkeep
thread.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 5a9d6c080d77c7e3644b02cab4f8c91900f4fe8f)

Conflicts:
src/mds/MDCache.cc
- octopus has a line, in->maybe_ephemeral_dist(false);, which is not there in
  master

src/mds/MDCache.cc
src/mds/MDCache.h

index 73ca762962f60095d904c7e06744ef6735bf10d8..a187f952154faccccd624addc948f9233d95cf06 100644 (file)
@@ -324,10 +324,6 @@ void MDCache::add_inode(CInode *in)
       base_inodes.insert(in);
   }
 
-  if (cache_toofull()) {
-    exceeded_size_limit = true;
-  }
-
   in->maybe_ephemeral_dist(false);
 }
 
@@ -7788,20 +7784,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 2d68d84d41b802a5f503c7fb48a9a09876186aa3..6d34aeee7537eae1361285948073f3095508a1c5 100644 (file)
@@ -1147,7 +1147,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") */