mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
Merge pull request #37983 from tchaikov/wip-crimson-os-co-locate-alien-allocator
crimson/os: do not configure seastar allocator for alien threads Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
This commit is contained in:
commit
5c5a038acb
@ -84,9 +84,6 @@ void *Thread::entry_wrapper()
|
||||
_set_affinity(cpuid);
|
||||
|
||||
ceph_pthread_setname(pthread_self(), thread_name.c_str());
|
||||
#ifdef WITH_SEASTAR
|
||||
crimson::os::AlienStore::configure_thread_memory();
|
||||
#endif
|
||||
return entry();
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include "alien_store.h"
|
||||
|
||||
#include <map>
|
||||
#include <optional>
|
||||
#include <string_view>
|
||||
#include <boost/algorithm/string/trim.hpp>
|
||||
#include <fmt/format.h>
|
||||
@ -13,9 +12,7 @@
|
||||
|
||||
#include <seastar/core/alien.hh>
|
||||
#include <seastar/core/future-util.hh>
|
||||
#include <seastar/core/memory.hh>
|
||||
#include <seastar/core/reactor.hh>
|
||||
#include <seastar/core/resource.hh>
|
||||
|
||||
#include "common/ceph_context.h"
|
||||
#include "global/global_context.h"
|
||||
@ -570,13 +567,4 @@ int AlienStore::AlienOmapIterator::status() const
|
||||
return iter->status();
|
||||
}
|
||||
|
||||
void AlienStore::configure_thread_memory()
|
||||
{
|
||||
std::vector<seastar::resource::memory> layout;
|
||||
// 1 GiB for experimenting. Perhaps we'll introduce a config option later.
|
||||
// TODO: consider above.
|
||||
layout.emplace_back(seastar::resource::memory{1024 * 1024 * 1024, 0});
|
||||
seastar::memory::configure(layout, false, std::nullopt);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -111,7 +111,6 @@ public:
|
||||
CollectionRef ch,
|
||||
const ghobject_t& oid) final;
|
||||
|
||||
static void configure_thread_memory();
|
||||
private:
|
||||
constexpr static unsigned MAX_KEYS_PER_OMAP_GET_CALL = 32;
|
||||
mutable std::unique_ptr<crimson::os::ThreadPool> tp;
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include "include/ceph_assert.h"
|
||||
#include "crimson/common/config_proxy.h"
|
||||
#include "crimson/os/alienstore/alien_store.h"
|
||||
|
||||
using crimson::common::local_conf;
|
||||
|
||||
@ -23,7 +22,6 @@ ThreadPool::ThreadPool(size_t n_threads,
|
||||
if (cpu_id >= 0) {
|
||||
pin(cpu_id);
|
||||
}
|
||||
crimson::os::AlienStore::configure_thread_memory();
|
||||
loop(queue_max_wait);
|
||||
});
|
||||
}
|
||||
|
@ -4,9 +4,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <map>
|
||||
#include <typeinfo>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
#include <seastar/core/future.hh>
|
||||
|
@ -1,10 +1,6 @@
|
||||
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
|
||||
// vim: ts=8 sw=2 smarttab
|
||||
|
||||
#ifdef WITH_SEASTAR
|
||||
#include "crimson/os/alienstore/alien_store.h"
|
||||
#endif
|
||||
|
||||
#include "BlueRocksEnv.h"
|
||||
#include "BlueFS.h"
|
||||
#include "include/stringify.h"
|
||||
@ -591,11 +587,3 @@ rocksdb::Status BlueRocksEnv::GetTestDirectory(std::string* path)
|
||||
*path = "temp_" + stringify(++foo);
|
||||
return rocksdb::Status::OK();
|
||||
}
|
||||
|
||||
void BlueRocksEnv::StartThread(void(*function)(void* arg), void* arg)
|
||||
{
|
||||
#ifdef WITH_SEASTAR
|
||||
crimson::os::AlienStore::configure_thread_memory();
|
||||
#endif
|
||||
base_t::StartThread(function, arg);
|
||||
}
|
||||
|
@ -16,8 +16,6 @@
|
||||
class BlueFS;
|
||||
|
||||
class BlueRocksEnv : public rocksdb::EnvWrapper {
|
||||
using base_t = EnvWrapper;
|
||||
|
||||
void split(const std::string &fn, std::string *dir, std::string *file) {
|
||||
size_t slash = fn.rfind('/');
|
||||
*file = fn.substr(slash + 1);
|
||||
@ -158,9 +156,6 @@ public:
|
||||
rocksdb::Status GetAbsolutePath(const std::string& db_path,
|
||||
std::string* output_path) override;
|
||||
|
||||
// Start new thread taking care about Seastar's allocator init.
|
||||
void StartThread(void(*function)(void* arg), void* arg) override;
|
||||
|
||||
explicit BlueRocksEnv(BlueFS *f);
|
||||
private:
|
||||
BlueFS *fs;
|
||||
|
@ -36,7 +36,6 @@ add_ceph_test(unittest-seastar-alienstore-thread-pool
|
||||
unittest-seastar-alienstore-thread-pool --memory 256M --smp 1)
|
||||
target_link_libraries(unittest-seastar-alienstore-thread-pool
|
||||
crimson-os
|
||||
crimson-alienstore
|
||||
crimson)
|
||||
|
||||
add_executable(unittest-seastar-config
|
||||
|
Loading…
Reference in New Issue
Block a user