libfoedus-core
FOEDUS Core Library
|
Repository of memories dynamically acquired and shared within one NUMA node (socket). More...
Repository of memories dynamically acquired and shared within one NUMA node (socket).
One NumaNodeMemory corresponds to one foedus::thread::ThreadGroup. All threads in the thread group belong to the NUMA node, thus sharing memories between them must be efficient. So, all memories here are allocated/freed via numa_alloc_interleaved(), numa_alloc_onnode(), and numa_free() (except the user specifies to not use them).
Definition at line 48 of file numa_node_memory.hpp.
#include <numa_node_memory.hpp>
|
delete |
foedus::memory::NumaNodeMemory::NumaNodeMemory | ( | Engine * | engine, |
foedus::thread::ThreadGroupId | numa_node | ||
) |
Definition at line 41 of file numa_node_memory.cpp.
|
inline |
Definition at line 88 of file numa_node_memory.hpp.
References allocate_numa_memory_general(), and foedus::memory::kHugepageSize.
Referenced by initialize_once().
|
inline |
Definition at line 85 of file numa_node_memory.hpp.
References allocate_numa_memory_general().
Referenced by initialize_once(), foedus::memory::NumaCoreMemory::initialize_once(), and foedus::log::Logger::initialize_once().
ErrorStack foedus::memory::NumaNodeMemory::allocate_numa_memory_general | ( | uint64_t | size, |
uint64_t | alignment, | ||
AlignedMemory * | out | ||
) | const |
Allocate a memory of the given size on this NUMA node.
[in] | size | byte size of the memory to acquire |
[in] | alignment | alignment size |
[out] | out | allocated memory is moved to object |
Definition at line 201 of file numa_node_memory.cpp.
References foedus::memory::AlignedMemory::alloc(), ASSERT_ND, ERROR_STACK, foedus::Engine::get_options(), foedus::memory::AlignedMemory::is_null(), foedus::kErrorCodeOutofmemory, foedus::memory::kHugepageSize, foedus::memory::AlignedMemory::kNumaAllocOnnode, foedus::memory::AlignedMemory::kNumaMmapOneGbPages, foedus::kRetOk, foedus::EngineOptions::memory_, and foedus::memory::MemoryOptions::use_mmap_hugepages_.
Referenced by allocate_huge_numa_memory(), and allocate_numa_memory().
std::string foedus::memory::NumaNodeMemory::dump_free_memory_stat | ( | ) | const |
Report rough statistics of free memory.
Definition at line 220 of file numa_node_memory.cpp.
References foedus::memory::PagePool::Stat::allocated_pages_, foedus::memory::PagePool::get_stat(), and foedus::memory::PagePool::Stat::total_pages_.
|
inline |
Definition at line 66 of file numa_node_memory.hpp.
|
inline |
Definition at line 67 of file numa_node_memory.hpp.
References foedus::thread::decompose_numa_local_ordinal().
Referenced by foedus::thread::ThreadPimpl::initialize_once(), and foedus::log::ThreadLogBuffer::initialize_once().
|
inline |
Definition at line 70 of file numa_node_memory.hpp.
|
inline |
Definition at line 62 of file numa_node_memory.hpp.
References ASSERT_ND, and foedus::thread::kMaxThreadLocalOrdinal.
|
inline |
Definition at line 100 of file numa_node_memory.hpp.
Referenced by foedus::memory::NumaCoreMemory::initialize_once().
|
inline |
Definition at line 55 of file numa_node_memory.hpp.
Referenced by foedus::memory::NumaCoreMemory::NumaCoreMemory().
|
inline |
Definition at line 59 of file numa_node_memory.hpp.
Referenced by foedus::cache::CacheManagerPimpl::initialize_once(), and foedus::thread::ThreadPimpl::initialize_once().
|
inline |
Definition at line 96 of file numa_node_memory.hpp.
Referenced by foedus::memory::NumaCoreMemory::initialize_once().
|
inline |
Definition at line 58 of file numa_node_memory.hpp.
Referenced by foedus::cache::CacheManagerPimpl::initialize_once(), foedus::memory::NumaCoreMemory::initialize_once(), and foedus::thread::ThreadPimpl::initialize_once().
|
inline |
Definition at line 92 of file numa_node_memory.hpp.
Referenced by foedus::memory::NumaCoreMemory::initialize_once().
|
inline |
Definition at line 57 of file numa_node_memory.hpp.
Referenced by foedus::memory::NumaCoreMemory::initialize_once(), and foedus::thread::ThreadPimpl::initialize_once().
|
overridevirtual |
Implements foedus::DefaultInitializable.
Definition at line 57 of file numa_node_memory.cpp.
References foedus::memory::AlignedMemory::alloc(), allocate_huge_numa_memory(), allocate_numa_memory(), ASSERT_ND, foedus::memory::PagePool::attach(), foedus::EngineOptions::cache_, CHECK_ERROR, foedus::memory::AlignedMemory::get_block(), foedus::memory::PagePool::get_memory_size(), foedus::soc::SharedMemoryRepo::get_node_memory_anchors(), foedus::memory::get_numa_node_size(), foedus::Engine::get_options(), foedus::soc::SocManager::get_shared_memory_repo(), foedus::memory::AlignedMemory::get_size(), foedus::Engine::get_soc_manager(), foedus::soc::SharedMemoryRepo::get_volatile_pool(), foedus::memory::PagePool::initialize(), foedus::memory::PagePool::is_initialized(), foedus::memory::AlignedMemory::kNumaAllocOnnode, foedus::storage::kPageSize, foedus::kRetOk, foedus::EngineOptions::memory_, foedus::memory::MemoryOptions::page_pool_size_mb_per_node_, foedus::memory::MemoryOptions::rigorous_page_boundary_check_, foedus::memory::PagePool::set_debug_pool_name(), foedus::cache::CacheOptions::snapshot_cache_size_mb_per_node_, and foedus::soc::NodeMemoryAnchors::volatile_pool_status_.
|
overridevirtual |
Implements foedus::DefaultInitializable.
Definition at line 175 of file numa_node_memory.cpp.
References foedus::ErrorStackBatch::emprace_back(), foedus::memory::get_numa_node_size(), foedus::memory::AlignedMemory::release_block(), SUMMARIZE_ERROR_BATCH, foedus::memory::PagePool::uninitialize(), and foedus::ErrorStackBatch::uninitialize_and_delete_all().