]> 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)
committerRamana Raja <rraja@redhat.com>
Fri, 16 Apr 2021 22:24:44 +0000 (18:24 -0400)
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.h

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

index eb0a706fe8f5358ad4bd8bc5aa57cf9b498e538d..837c5f4dc252749d62c5b27600c9edc83e0a7521 100644 (file)
@@ -301,10 +301,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) 
@@ -7666,20 +7662,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 ab5adb68d58e1f91f2c482eb3a0ad818d39b11d0..10946be8fca582262a511adf58f13d39d00a7692 100644 (file)
@@ -156,8 +156,6 @@ class MDCache {
 
   Filer filer;
 
-  bool exceeded_size_limit = false;
-
 private:
   uint64_t cache_inode_limit;
   uint64_t cache_memory_limit;