From: Patrick Donnelly Date: Tue, 5 Jan 2021 17:03:27 +0000 (-0800) Subject: mds: avoid spurious sleeps X-Git-Tag: v14.2.17~41^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F39130%2Fhead;p=ceph.git mds: avoid spurious sleeps 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 (cherry picked from commit eb47e990c33843b9baa366e2b2a187439210e680) Conflicts: src/client/Client.cc - in the nautilus version of this file, the code being modified does not exist --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 03c36c093364..cfc5b61ec7f3 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -188,7 +188,7 @@ MDCache::MDCache(MDSRank *m, PurgeQueue &purge_queue_) : } since = now-upkeep_last_release; auto release_interval = clock::duration(g_conf().get_val("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();