|
libfoedus-core
FOEDUS Core Library
|
Pimpl object of ThreadPool. More...
Pimpl object of ThreadPool.
A private pimpl object for ThreadPool. Do not include this header from a client program unless you know what you are doing.
Definition at line 41 of file thread_pool_pimpl.hpp.
#include <thread_pool_pimpl.hpp>


Public Member Functions | |
| ThreadPoolPimpl ()=delete | |
| ThreadPoolPimpl (Engine *engine) | |
| ErrorStack | initialize_once () override |
| ErrorStack | uninitialize_once () override |
| bool | impersonate (const proc::ProcName &proc_name, const void *task_input, uint64_t task_input_size, ImpersonateSession *session) |
| bool | impersonate_on_numa_node (ThreadGroupId node, const proc::ProcName &proc_name, const void *task_input, uint64_t task_input_size, ImpersonateSession *session) |
| bool | impersonate_on_numa_core (ThreadId core, const proc::ProcName &proc_name, const void *task_input, uint64_t task_input_size, ImpersonateSession *session) |
| ThreadGroupRef * | get_group (ThreadGroupId numa_node) |
| ThreadGroup * | get_local_group () const |
| ThreadRef * | get_thread (ThreadId id) |
| ThreadRef | get_thread_ref (ThreadId id) __attribute__((always_inline)) |
| For better performance, but for some reason this method causes an issue in MCS lock. More... | |
Public Member Functions inherited from foedus::DefaultInitializable | |
| DefaultInitializable () | |
| virtual | ~DefaultInitializable () |
| DefaultInitializable (const DefaultInitializable &)=delete | |
| DefaultInitializable & | operator= (const DefaultInitializable &)=delete |
| ErrorStack | initialize () override final |
| Typical implementation of Initializable::initialize() that provides initialize-once semantics. More... | |
| ErrorStack | uninitialize () override final |
| Typical implementation of Initializable::uninitialize() that provides uninitialize-once semantics. More... | |
| bool | is_initialized () const override final |
| Returns whether the object has been already initialized or not. More... | |
Public Member Functions inherited from foedus::Initializable | |
| virtual | ~Initializable () |
Public Attributes | |
| Engine *const | engine_ |
| ThreadGroup * | local_group_ |
| Thread group of the local SOC engine. More... | |
| std::vector< ThreadGroupRef > | groups_ |
| List of all thread groups, one for each NUMA node in this engine. More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &o, const ThreadPoolPimpl &v) |
|
delete |
|
inlineexplicit |
Definition at line 44 of file thread_pool_pimpl.hpp.
|
inline |
Definition at line 66 of file thread_pool_pimpl.hpp.
References groups_.
Referenced by foedus::thread::ThreadPool::get_group_ref(), and get_thread().

|
inline |
Definition at line 67 of file thread_pool_pimpl.hpp.
References local_group_.
Referenced by foedus::log::Logger::initialize_once().

Definition at line 74 of file thread_pool_pimpl.cpp.
References foedus::thread::decompose_numa_local_ordinal(), foedus::thread::decompose_numa_node(), get_group(), and foedus::thread::ThreadGroupRef::get_thread().
Referenced by foedus::thread::ThreadPool::get_thread_ref(), and impersonate_on_numa_core().


For better performance, but for some reason this method causes an issue in MCS lock.
Definition at line 92 of file thread_pool_pimpl.hpp.
References foedus::thread::decompose_numa_local_ordinal(), foedus::thread::decompose_numa_node(), and groups_.
Referenced by foedus::thread::ThreadPimpl::get_thread_ref().


| bool foedus::thread::ThreadPoolPimpl::impersonate | ( | const proc::ProcName & | proc_name, |
| const void * | task_input, | ||
| uint64_t | task_input_size, | ||
| ImpersonateSession * | session | ||
| ) |
Definition at line 79 of file thread_pool_pimpl.cpp.
References engine_, foedus::Engine::get_options(), groups_, foedus::EngineOptions::thread_, foedus::thread::ThreadOptions::thread_count_per_group_, and foedus::thread::ThreadRef::try_impersonate().
Referenced by foedus::thread::ThreadPool::impersonate().


| bool foedus::thread::ThreadPoolPimpl::impersonate_on_numa_core | ( | ThreadId | core, |
| const proc::ProcName & | proc_name, | ||
| const void * | task_input, | ||
| uint64_t | task_input_size, | ||
| ImpersonateSession * | session | ||
| ) |
Definition at line 111 of file thread_pool_pimpl.cpp.
References get_thread(), and foedus::thread::ThreadRef::try_impersonate().
Referenced by foedus::thread::ThreadPool::impersonate_on_numa_core().


| bool foedus::thread::ThreadPoolPimpl::impersonate_on_numa_node | ( | ThreadGroupId | node, |
| const proc::ProcName & | proc_name, | ||
| const void * | task_input, | ||
| uint64_t | task_input_size, | ||
| ImpersonateSession * | session | ||
| ) |
Definition at line 95 of file thread_pool_pimpl.cpp.
References engine_, foedus::Engine::get_options(), foedus::thread::ThreadGroupRef::get_thread(), groups_, foedus::EngineOptions::thread_, foedus::thread::ThreadOptions::thread_count_per_group_, and foedus::thread::ThreadRef::try_impersonate().
Referenced by foedus::thread::ThreadPool::impersonate_on_numa_node().


|
overridevirtual |
Implements foedus::DefaultInitializable.
Definition at line 40 of file thread_pool_pimpl.cpp.
References ASSERT_ND, CHECK_ERROR, engine_, ERROR_STACK, foedus::Engine::get_memory_manager(), foedus::Engine::get_options(), foedus::Engine::get_soc_id(), groups_, foedus::DefaultInitializable::initialize(), foedus::DefaultInitializable::is_initialized(), foedus::Engine::is_master(), foedus::kErrorCodeDepedentModuleUnavailableInit, foedus::kRetOk, local_group_, and foedus::EngineOptions::thread_.

|
overridevirtual |
Implements foedus::DefaultInitializable.
Definition at line 59 of file thread_pool_pimpl.cpp.
References ASSERT_ND, foedus::ErrorStackBatch::emprace_back(), engine_, ERROR_STACK, foedus::Engine::get_memory_manager(), groups_, foedus::DefaultInitializable::is_initialized(), foedus::Engine::is_master(), foedus::kErrorCodeDepedentModuleUnavailableUninit, local_group_, SUMMARIZE_ERROR_BATCH, and foedus::DefaultInitializable::uninitialize().

|
friend |
Definition at line 121 of file thread_pool_pimpl.cpp.
| Engine* const foedus::thread::ThreadPoolPimpl::engine_ |
Definition at line 77 of file thread_pool_pimpl.hpp.
Referenced by impersonate(), impersonate_on_numa_node(), initialize_once(), and uninitialize_once().
| std::vector<ThreadGroupRef> foedus::thread::ThreadPoolPimpl::groups_ |
List of all thread groups, one for each NUMA node in this engine.
Index is ThreadGroupId.
Definition at line 89 of file thread_pool_pimpl.hpp.
Referenced by get_group(), get_thread_ref(), impersonate(), impersonate_on_numa_node(), initialize_once(), foedus::thread::operator<<(), and uninitialize_once().
| ThreadGroup* foedus::thread::ThreadPoolPimpl::local_group_ |
Thread group of the local SOC engine.
If this is a master engine, null.
Definition at line 83 of file thread_pool_pimpl.hpp.
Referenced by get_local_group(), initialize_once(), and uninitialize_once().