mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
context: keep the resolve cache smaller
We don't need to cache 65536 extent maps, especially if each one can have almost 700K references. Valgrind's massif tool points to the extent map cache as a very large memory allocator, but test runs with memcg disagree. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
d5d17cbe62
commit
d6d3e1045e
@ -43,12 +43,13 @@ BeesFdCache::BeesFdCache(shared_ptr<BeesContext> ctx) :
|
||||
void
|
||||
BeesFdCache::clear()
|
||||
{
|
||||
BEESNOTE("Clearing root FD cache to enable subvol delete");
|
||||
BEESLOGDEBUG("Clearing root FD cache to enable subvol delete");
|
||||
BEESLOGDEBUG("Clearing root FD cache with size " << m_root_cache.size() << " to enable subvol delete");
|
||||
BEESNOTE("Clearing root FD cache with size " << m_root_cache.size());
|
||||
m_root_cache.clear();
|
||||
BEESCOUNT(root_clear);
|
||||
BEESLOGDEBUG("Clearing open FD cache to enable file delete");
|
||||
BEESNOTE("Clearing open FD cache to enable file delete");
|
||||
|
||||
BEESLOGDEBUG("Clearing open FD cache with size " << m_file_cache.size() << " to enable file delete");
|
||||
BEESNOTE("Clearing open FD cache with size " << m_file_cache.size());
|
||||
m_file_cache.clear();
|
||||
BEESCOUNT(open_clear);
|
||||
}
|
||||
@ -854,6 +855,14 @@ BeesContext::invalidate_addr(BeesAddress addr)
|
||||
return m_resolve_cache.expire(addr.get_physical_or_zero());
|
||||
}
|
||||
|
||||
void
|
||||
BeesContext::resolve_cache_clear()
|
||||
{
|
||||
BEESNOTE("clearing resolve cache with size " << m_resolve_cache.size());
|
||||
BEESLOGDEBUG("Clearing resolve cache with size " << m_resolve_cache.size());
|
||||
return m_resolve_cache.clear();
|
||||
}
|
||||
|
||||
void
|
||||
BeesContext::set_root_fd(Fd fd)
|
||||
{
|
||||
|
@ -722,6 +722,7 @@ void
|
||||
BeesRoots::clear_caches()
|
||||
{
|
||||
m_ctx->fd_cache()->clear();
|
||||
m_ctx->resolve_cache_clear();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -766,6 +766,7 @@ public:
|
||||
|
||||
BeesResolveAddrResult resolve_addr(BeesAddress addr);
|
||||
void invalidate_addr(BeesAddress addr);
|
||||
void resolve_cache_clear();
|
||||
|
||||
void dump_status();
|
||||
void show_progress();
|
||||
|
Loading…
x
Reference in New Issue
Block a user