mirror of
https://github.com/Zygo/bees.git
synced 2025-07-03 09:12:25 +02:00
context: raise limit on the number of concurrent ioctls to cpu_cores/2
This might improve performance on systems with more than 3 CPU cores...or it might bring such a machine to its knees. TODO: find out which of those two things happens. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include "bees.h"
|
||||
|
||||
#include "crucible/cache.h"
|
||||
#include "crucible/process.h"
|
||||
#include "crucible/string.h"
|
||||
|
||||
#include <fstream>
|
||||
@ -554,7 +555,7 @@ void
|
||||
BeesCrawl::crawl_thread()
|
||||
{
|
||||
Timer crawl_timer;
|
||||
LockSet<uint64_t>::Lock crawl_lock(m_ctx->roots()->lock_set(), m_state.m_root, false);
|
||||
auto crawl_lock = m_ctx->roots()->lock_set().make_lock(m_state.m_root, false);
|
||||
while (!m_stopped) {
|
||||
BEESNOTE("waiting for crawl thread limit " << m_state);
|
||||
crawl_lock.lock();
|
||||
@ -646,7 +647,7 @@ BeesCrawl::fetch_extents()
|
||||
bool ioctl_ok = false;
|
||||
{
|
||||
BEESNOTE("waiting to search crawl sk " << static_cast<btrfs_ioctl_search_key&>(sk));
|
||||
unique_lock<mutex> lock(bees_ioctl_mutex);
|
||||
auto lock = bees_ioctl_lock_set.make_lock(gettid());
|
||||
|
||||
BEESNOTE("searching crawl sk " << static_cast<btrfs_ioctl_search_key&>(sk));
|
||||
BEESTOOLONG("Searching crawl sk " << static_cast<btrfs_ioctl_search_key&>(sk));
|
||||
|
Reference in New Issue
Block a user