libfoedus-core
FOEDUS Core Library
|
A helper class to return a bunch of pages to individual nodes. More...
A helper class to return a bunch of pages to individual nodes.
This returns a large number of pages much more efficiently than returning one-by-one, especially if the in-memory pages might come from different NUMA nodes. So far this is used when we shutdown the engine or drop a storage.
Definition at line 276 of file page_pool.hpp.
#include <page_pool.hpp>
Public Types | |
typedef PagePoolOffsetChunk * | ChunkPtr |
Public Member Functions | |
PageReleaseBatch (Engine *engine) | |
~PageReleaseBatch () | |
PageReleaseBatch ()=delete | |
PageReleaseBatch (const PageReleaseBatch &)=delete | |
PageReleaseBatch & | operator= (const PageReleaseBatch &)=delete |
void | release (storage::VolatilePagePointer page_id) |
Returns the given in-memory volatile page to appropriate NUMA node. More... | |
void | release (thread::ThreadGroupId numa_node, PagePoolOffset offset) |
Returns the given in-memory page to the specified NUMA node. More... | |
void | release_chunk (thread::ThreadGroupId numa_node) |
Return all batched pages in the given chunk to its pool. More... | |
void | release_all () |
Called at the end to return all batched pages to their pools. More... | |
Definition at line 278 of file page_pool.hpp.
|
explicit |
Definition at line 153 of file page_pool.cpp.
foedus::memory::PageReleaseBatch::~PageReleaseBatch | ( | ) |
Definition at line 161 of file page_pool.cpp.
References release_all().
|
delete |
|
delete |
|
delete |
|
inline |
Returns the given in-memory volatile page to appropriate NUMA node.
This internally batches the pages to return. At the end, call release_all() to flush it.
Definition at line 292 of file page_pool.hpp.
Referenced by foedus::storage::hash::HashIntermediatePage::release_pages_recursive(), foedus::storage::hash::HashDataPage::release_pages_recursive(), foedus::storage::array::ArrayStoragePimpl::release_pages_recursive(), foedus::storage::masstree::MasstreeIntermediatePage::release_pages_recursive(), and foedus::storage::masstree::MasstreeBorderPage::release_pages_recursive().
void foedus::memory::PageReleaseBatch::release | ( | thread::ThreadGroupId | numa_node, |
PagePoolOffset | offset | ||
) |
Returns the given in-memory page to the specified NUMA node.
This internally batches the pages to return. At the end, call release_all() to flush it.
Definition at line 169 of file page_pool.cpp.
References ASSERT_ND, foedus::memory::PagePoolOffsetChunk::push_back(), and release_chunk().
void foedus::memory::PageReleaseBatch::release_all | ( | ) |
Called at the end to return all batched pages to their pools.
Definition at line 189 of file page_pool.cpp.
References release_chunk().
Referenced by foedus::storage::array::ArrayStorage::drop(), foedus::storage::hash::HashIntermediatePage::release_pages_recursive_parallel(), foedus::storage::masstree::release_parallel(), and ~PageReleaseBatch().
void foedus::memory::PageReleaseBatch::release_chunk | ( | thread::ThreadGroupId | numa_node | ) |
Return all batched pages in the given chunk to its pool.
Definition at line 178 of file page_pool.cpp.
References ASSERT_ND, foedus::Engine::get_memory_manager(), foedus::memory::EngineMemory::get_node_memory(), foedus::memory::NumaNodeMemoryRef::get_volatile_pool(), and foedus::memory::PagePool::release().
Referenced by release(), and release_all().