]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: avoid spurious sleeps
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 5 Jan 2021 17:03:27 +0000 (09:03 -0800)
committerNathan Cutler <ncutler@suse.com>
Tue, 4 May 2021 13:58:21 +0000 (15:58 +0200)
Like trim_interval, don't sleep for small amounts of time. This avoids
spurious sleeps like:

    2020-12-25T00:14:22.242+0000 7f6a95884700 20 mds.0.cache upkeep thread waiting interval 0.000000108s
    2020-12-25T00:14:22.242+0000 7f6a95884700 20 mds.0.cache upkeep thread waiting interval 0.000000108s
    2020-12-25T00:14:22.242+0000 7f6a95884700 20 mds.0.cache upkeep thread waiting interval 0.000000108s
    2020-12-25T00:14:22.242+0000 7f6a95884700 20 mds.0.cache upkeep thread waiting interval 0.000000108s
    2020-12-25T00:14:22.242+0000 7f6a95884700 20 mds.0.cache upkeep thread waiting interval 0.000000108s
    2020-12-25T00:14:22.242+0000 7f6a95884700 20 mds.0.cache upkeep thread waiting interval 0.000000108s
    2020-12-25T00:14:22.242+0000 7f6a95884700 20 mds.0.cache upkeep thread waiting interval 0.000000108s

Also, fix the same issue in the Client.

Fixes: https://tracker.ceph.com/issues/48753
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit eb47e990c33843b9baa366e2b2a187439210e680)

Conflicts:
src/client/Client.cc
- the code being changed does not exist in octopus

src/mds/MDCache.cc

index a187f952154faccccd624addc948f9233d95cf06..842ad7d860190b2026c24729ed0eb058067cce4b 100644 (file)
@@ -190,7 +190,7 @@ MDCache::MDCache(MDSRank *m, PurgeQueue &purge_queue_) :
       }
       since = now-upkeep_last_release;
       auto release_interval = clock::duration(g_conf().get_val<std::chrono::seconds>("mds_cache_release_free_interval"));
-      if (since >= release_interval) {
+      if (since >= release_interval*.90) {
         /* XXX not necessary once MDCache uses PriorityCache */
         dout(10) << "releasing free memory" << dendl;
         ceph_heap_release_free_memory();