libfoedus-core
FOEDUS Core Library
|
Resolves an offset in a volatile page pool to an actual pointer and vice versa. More...
Resolves an offset in a volatile page pool to an actual pointer and vice versa.
This class abstracts how we convert 4-byte page-pool offset plus NUMA node id to/from 8-byte pointer. This method must be VERY efficient, thus everything is inlined. This also abstracts how we access in-memory pages in other NUMA node for volatile pages.
Note Note that this is only for volatile pages. As snapshot cache is per-node, there is no global snapshot page resolver (just the node-local one should be enough).
This object is copiable and the copying is moderately efficient.
Definition at line 92 of file page_resolver.hpp.
#include <page_resolver.hpp>
Public Types | |
enum | Constants { kMaxNumaNode = 256 } |
typedef storage::Page * | Base |
Public Member Functions | |
GlobalVolatilePageResolver () | |
GlobalVolatilePageResolver (const Base *bases, uint16_t numa_node_count, PagePoolOffset begin, PagePoolOffset end) | |
GlobalVolatilePageResolver (const GlobalVolatilePageResolver &other) | |
GlobalVolatilePageResolver & | operator= (const GlobalVolatilePageResolver &other) |
storage::Page * | resolve_offset (uint8_t numa_node, PagePoolOffset offset) const __attribute__((always_inline)) |
Resolves offset plus NUMA node ID to storage::Page*. More... | |
storage::Page * | resolve_offset (storage::VolatilePagePointer page_pointer) const __attribute__((always_inline)) |
Resolves volatile page ID to storage::Page*. More... | |
storage::Page * | resolve_offset_newpage (uint8_t numa_node, PagePoolOffset offset) const __attribute__((always_inline)) |
As the name suggests, this version is for new pages, which don't have sanity checks. More... | |
storage::Page * | resolve_offset_newpage (storage::VolatilePagePointer page_pointer) const __attribute__((always_inline)) |
As the name suggests, this version is for new pages, which don't have sanity checks. More... | |
Public Attributes | |
uint16_t | numa_node_count_ |
number of NUMA nodes in this engine. More... | |
PagePoolOffset | begin_ |
where a valid page entry starts. More... | |
PagePoolOffset | end_ |
where a valid page entry ends. More... | |
Base | bases_ [kMaxNumaNode] |
base address to calculate from/to offset. More... | |
Definition at line 93 of file page_resolver.hpp.
|
inline |
Definition at line 97 of file page_resolver.hpp.
|
inline |
Definition at line 98 of file page_resolver.hpp.
References ASSERT_ND, bases_, kMaxNumaNode, and numa_node_count_.
|
inline |
Definition at line 105 of file page_resolver.hpp.
References operator=().
|
inline |
Definition at line 108 of file page_resolver.hpp.
References ASSERT_ND, bases_, begin_, end_, kMaxNumaNode, and numa_node_count_.
Referenced by GlobalVolatilePageResolver().
|
inline |
Resolves offset plus NUMA node ID to storage::Page*.
Definition at line 120 of file page_resolver.hpp.
References ASSERT_ND, foedus::storage::assert_valid_volatile_page(), foedus::storage::construct_volatile_page_pointer(), foedus::storage::Page::get_header(), foedus::storage::PageHeader::page_id_, and resolve_offset_newpage().
Referenced by foedus::storage::assert_within_valid_volatile_page_impl(), foedus::storage::hash::HashStoragePimpl::debugout_single_thread(), foedus::storage::masstree::MasstreeStoragePimpl::debugout_single_thread_follow(), foedus::storage::array::ArrayPartitioner::design_partition(), foedus::storage::masstree::MasstreePartitioner::design_partition(), foedus::storage::masstree::design_partition_first_parallel(), foedus::storage::masstree::design_partition_first_parallel_recurse(), foedus::storage::hash::HashPartitioner::design_partition_task(), foedus::storage::masstree::MasstreeStoragePimpl::drop(), foedus::storage::hash::HashStoragePimpl::drop(), foedus::storage::Composer::DropVolatilesArguments::drop(), foedus::thread::ThreadPimpl::follow_page_pointer(), foedus::thread::ThreadPimpl::follow_page_pointers_for_read_batch(), foedus::thread::ThreadPimpl::follow_page_pointers_for_write_batch(), foedus::storage::masstree::MasstreeStoragePimpl::hcc_reset_all_temperature_stat_follow(), foedus::thread::ThreadPimpl::is_volatile_page_retired(), foedus::storage::masstree::MasstreeStoragePimpl::peek_volatile_page_boundaries(), foedus::storage::masstree::MasstreeStoragePimpl::peek_volatile_page_boundaries_next_layer(), foedus::storage::masstree::MasstreeStoragePimpl::peek_volatile_page_boundaries_this_layer_recurse(), foedus::thread::ThreadPimpl::place_a_new_volatile_page(), 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(), foedus::storage::masstree::MasstreeBorderPage::release_pages_recursive(), foedus::storage::masstree::release_parallel(), foedus::storage::hash::release_parallel(), foedus::thread::Thread::resolve(), foedus::storage::hash::resolve_data_impl(), foedus::storage::hash::resolve_intermediate_impl(), resolve_offset(), foedus::storage::masstree::MasstreeBorderPage::track_moved_record_next_layer(), foedus::storage::hash::HashStoragePimpl::track_moved_record_search(), foedus::storage::array::ArrayStoragePimpl::verify_single_thread(), and foedus::storage::hash::HashStoragePimpl::verify_single_thread().
|
inline |
Resolves volatile page ID to storage::Page*.
Definition at line 129 of file page_resolver.hpp.
References resolve_offset().
|
inline |
As the name suggests, this version is for new pages, which don't have sanity checks.
Definition at line 134 of file page_resolver.hpp.
References foedus::storage::assert_aligned_page(), ASSERT_ND, bases_, begin_, end_, and numa_node_count_.
Referenced by foedus::storage::sequential::SequentialStoragePimpl::get_head_pointer(), foedus::storage::sequential::SequentialStoragePimpl::get_tail_pointer(), foedus::thread::Thread::resolve_newpage(), resolve_offset(), and resolve_offset_newpage().
|
inline |
As the name suggests, this version is for new pages, which don't have sanity checks.
Definition at line 144 of file page_resolver.hpp.
References resolve_offset_newpage().
Base foedus::memory::GlobalVolatilePageResolver::bases_[kMaxNumaNode] |
base address to calculate from/to offset.
index is NUMA node ID.
Definition at line 159 of file page_resolver.hpp.
Referenced by foedus::xct::from_universal_lock_id(), GlobalVolatilePageResolver(), foedus::xct::McsMockContext< RW_BLOCK >::init(), operator=(), and resolve_offset_newpage().
PagePoolOffset foedus::memory::GlobalVolatilePageResolver::begin_ |
where a valid page entry starts.
only for sanity checking.
Definition at line 154 of file page_resolver.hpp.
Referenced by foedus::storage::assert_within_valid_volatile_page_impl(), foedus::xct::McsMockContext< RW_BLOCK >::init(), operator=(), foedus::storage::masstree::MasstreeStoragePimpl::peek_volatile_page_boundaries_next_layer(), foedus::storage::masstree::MasstreeStoragePimpl::peek_volatile_page_boundaries_this_layer_recurse(), resolve_offset_newpage(), and foedus::xct::to_universal_lock_id().
PagePoolOffset foedus::memory::GlobalVolatilePageResolver::end_ |
where a valid page entry ends.
only for sanity checking.
Definition at line 156 of file page_resolver.hpp.
Referenced by foedus::storage::assert_within_valid_volatile_page_impl(), foedus::xct::McsMockContext< RW_BLOCK >::init(), operator=(), foedus::storage::masstree::MasstreeStoragePimpl::peek_volatile_page_boundaries_next_layer(), foedus::storage::masstree::MasstreeStoragePimpl::peek_volatile_page_boundaries_this_layer_recurse(), resolve_offset_newpage(), and foedus::xct::to_universal_lock_id().
uint16_t foedus::memory::GlobalVolatilePageResolver::numa_node_count_ |
number of NUMA nodes in this engine.
Definition at line 152 of file page_resolver.hpp.
Referenced by foedus::storage::assert_within_valid_volatile_page_impl(), GlobalVolatilePageResolver(), foedus::xct::McsMockContext< RW_BLOCK >::init(), operator=(), foedus::storage::masstree::MasstreeStoragePimpl::peek_volatile_page_boundaries_next_layer(), foedus::storage::masstree::MasstreeStoragePimpl::peek_volatile_page_boundaries_this_layer_recurse(), resolve_offset_newpage(), and foedus::xct::to_universal_lock_id().