Update the secondary group cache (#1492)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
mkdocs / deploy (push) Waiting to run

* Use concurrent_flat_map to build a global cache rather than per
thread.
* Create global maintanence thread manager for clearing unused cache
entries.
This commit is contained in:
trapexit 2025-07-05 17:05:53 -05:00 • committed by GitHub
parent 9e626228be
commit f852474073
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 342 additions and 246 deletions

View file

@ -8,6 +8,7 @@
#include "scope_guard.hpp"
#include "thread_pool.hpp"
#include "syslog.hpp"
#include "maintenance_thread.hpp"
#include "fuse_i.h"
#include "fuse_kernel.h"
@ -317,7 +318,7 @@ fuse_session_loop_mt(struct fuse_session *se_,
pin_threads_type_);
while(!fuse_session_exited(se_))
sem_wait(&finished);
sem_wait(&finished);
sem_destroy(&finished);
@ -325,22 +326,23 @@ fuse_session_loop_mt(struct fuse_session *se_,
}
int
fuse_loop_mt(struct fuse *f)
fuse_loop_mt(struct fuse *f_)
{
if(f == NULL)
int res;
if(f_ == NULL)
return -1;
int res = fuse_start_maintenance_thread(f);
if(res)
return -1;
MaintenanceThread::setup();
fuse_populate_maintenance_thread(f_);
res = fuse_session_loop_mt(fuse_get_session(f),
res = fuse_session_loop_mt(fuse_get_session(f_),
fuse_config_get_read_thread_count(),
fuse_config_get_process_thread_count(),
fuse_config_get_process_thread_queue_depth(),
fuse_config_get_pin_threads());
fuse_stop_maintenance_thread(f);
MaintenanceThread::stop();
return res;
}