18 #ifndef FOEDUS_MEMORY_NUMA_NODE_MEMORY_HPP_
19 #define FOEDUS_MEMORY_NUMA_NODE_MEMORY_HPP_
71 return core_memories_[ordinal];
94 return volatile_offset_chunk_memory_pieces_[core_ordinal];
98 return snapshot_offset_chunk_memory_pieces_[core_ordinal];
101 return log_buffer_memory_pieces_[logger];
109 ErrorStack initialize_page_offset_chunk_memory();
126 const uint16_t loggers_;
142 std::vector<NumaCoreMemory*> core_memories_;
148 std::vector<PagePoolOffsetChunk*> volatile_offset_chunk_memory_pieces_;
154 std::vector<PagePoolOffsetChunk*> snapshot_offset_chunk_memory_pieces_;
160 std::vector<AlignedMemorySlice> log_buffer_memory_pieces_;
194 #endif // FOEDUS_MEMORY_NUMA_NODE_MEMORY_HPP_
std::string dump_free_memory_stat() const
Report rough statistics of free memory.
const ThreadLocalOrdinal kMaxThreadLocalOrdinal
Maximum possible value of ThreadLocalOrdinal.
ErrorStack allocate_numa_memory(uint64_t size, AlignedMemory *out) const
NumaCoreMemory * get_core_memory(foedus::thread::ThreadId id) const
uint8_t ThreadLocalOrdinal
Typedef for a local ID of Thread (core), which is NOT unique across NUMA nodes.
Page pool for volatile read/write store (VolatilePage) and the read-only bufferpool (SnapshotPage)...
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
PagePool * get_snapshot_pool()
Typedefs of ID types used in thread package.
NumaNodeMemoryRef()=delete
Forward declarations of classes in transaction package.
ThreadLocalOrdinal decompose_numa_local_ordinal(ThreadId global_id)
Extracts local ordinal from the given globally unique ID of Thread (core).
foedus::thread::ThreadLocalOrdinal get_core_memory_count() const
Forward declarations of classes in root package.
PagePoolOffsetChunk * get_volatile_offset_chunk_memory_piece(foedus::thread::ThreadLocalOrdinal core_ordinal)
Brings error stacktrace information as return value of functions.
Typical implementation of Initializable as a skeleton base class.
std::string dump_free_memory_stat() const
Report rough statistics of free memory.
Typedefs of ID types used in log package.
ErrorStack initialize_once() override
Forward declarations of classes in cache package.
Repository of memories dynamically acquired within one CPU core (thread).
A view of NumaNodeMemory for other SOCs and master engine.
const uint64_t kHugepageSize
So far 2MB is the only page size available via Transparent Huge Page (THP).
foedus::thread::ThreadGroupId get_numa_node() const
#define CXX11_FINAL
Used in public headers in place of "final" of C++11.
std::vector< NumaCoreMemory * > & get_core_memories()
NumaCoreMemory * get_core_memory(foedus::thread::ThreadLocalOrdinal ordinal) const
Database engine object that holds all resources and provides APIs.
Repository of memories dynamically acquired and shared within one NUMA node (socket).
ErrorStack allocate_huge_numa_memory(uint64_t size, AlignedMemory *out) const
A NUMA-local hashtable of cached snapshot pages.
A slice of foedus::memory::AlignedMemory.
Forward declarations of classes in memory package.
foedus::thread::ThreadGroupId get_numa_node() const
#define CXX11_OVERRIDE
Used in public headers in place of "override" of C++11.
cache::CacheHashtable * get_snapshot_cache_table()
#define CXX11_FUNC_DELETE
Used in public headers in place of " = delete" of C++11.
To reduce the overhead of grabbing/releasing pages from pool, we pack this many pointers for each gra...
uint16_t ThreadId
Typedef for a global ID of Thread (core), which is unique across NUMA nodes.
Represents one memory block aligned to actual OS/hardware pages.
PagePool * get_volatile_pool()
ErrorStack uninitialize_once() override
PagePoolOffsetChunk * get_snapshot_offset_chunk_memory_piece(foedus::thread::ThreadLocalOrdinal core_ordinal)
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
uint16_t LoggerId
Typedef for an ID of Logger.
uint8_t ThreadGroupId
Typedef for an ID of ThreadGroup (NUMA node).
ErrorStack allocate_numa_memory_general(uint64_t size, uint64_t alignment, AlignedMemory *out) const
Allocate a memory of the given size on this NUMA node.
AlignedMemorySlice get_log_buffer_memory_piece(log::LoggerId logger)
PagePool * get_volatile_pool()