Skip to content

Commit

Permalink
mds: log lru stats during trim
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
  • Loading branch information
batrick committed Jun 22, 2023
1 parent fe35c9b commit a1ca8e8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/mds/MDCache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6786,6 +6786,13 @@ std::pair<bool, uint64_t> MDCache::trim_lru(uint64_t count, expiremap& expiremap
<< " pinned=" << lru.lru_get_num_pinned()
<< dendl;

dout(20) << "bottom_lru: " << bottom_lru.lru_get_size() << " items"
", " << bottom_lru.lru_get_top() << " top"
", " << bottom_lru.lru_get_bot() << " bot"
", " << bottom_lru.lru_get_pintail() << " pintail"
", " << bottom_lru.lru_get_num_pinned() << " pinned"
<< dendl;

const uint64_t trim_counter_start = trim_counter.get();
bool throttled = false;
while (1) {
Expand All @@ -6806,6 +6813,13 @@ std::pair<bool, uint64_t> MDCache::trim_lru(uint64_t count, expiremap& expiremap
}
unexpirables.clear();

dout(20) << "lru: " << lru.lru_get_size() << " items"
", " << lru.lru_get_top() << " top"
", " << lru.lru_get_bot() << " bot"
", " << lru.lru_get_pintail() << " pintail"
", " << lru.lru_get_num_pinned() << " pinned"
<< dendl;

// trim dentries from the LRU until count is reached
// if mds is in standby_replay and skip trimming the inodes
while (!throttled && (cache_toofull() || count > 0 || is_standby_replay)) {
Expand Down

0 comments on commit a1ca8e8

Please sign in to comment.