tlds
Transactional Operations for Linked Data Structures
|
Classes | |
struct | Read |
struct | Write |
struct | Time |
struct | RO |
struct | RW |
struct | R_RO |
struct | R_Time |
struct | W_RO |
struct | W_Time |
struct | Time_RO |
struct | R_W_RO |
struct | R_W_Time |
struct | R_Time_RO |
struct | W_Time_RO |
struct | R_W_Time_RO |
struct | TxnRatio |
struct | TxnRatio_R |
struct | TxnRatio_W |
struct | TxnRatio_RO |
struct | TxnRatio_Time |
struct | TxnRatio_RW |
struct | TxnRatio_R_RO |
struct | TxnRatio_R_Time |
struct | TxnRatio_W_RO |
struct | TxnRatio_W_Time |
struct | TxnRatio_RO_Time |
struct | TxnRatio_RW_RO |
struct | TxnRatio_RW_Time |
struct | TxnRatio_R_RO_Time |
struct | TxnRatio_W_RO_Time |
struct | TxnRatio_RW_RO_Time |
Functions | |
TM_INLINE unsigned long | norm_dist (unsigned long a, unsigned long b) |
TM_FASTCALL uint32_t | profile_nochange () |
template<class C > | |
uint32_t | cbr_tail (qtable_t &profile) |
TM_FASTCALL uint32_t | pol_CBR_RO () |
template<class C > | |
TM_FASTCALL uint32_t | cbr_nn () |
This file implements a few classifiers for trying to pick which algorithm to switch to, based on some existing information from a profile and a table of previous experiments.
TM_FASTCALL uint32_t anonymous_namespace{cbr.cpp}::cbr_nn | ( | ) |
This template provides the functionality we need for doing a nearest-neighbor classification where we use as input the summary profile, and scan through the qtable to find the most representative row
uint32_t anonymous_namespace{cbr.cpp}::cbr_tail | ( | qtable_t & | profile | ) |
Common part of CBR code
TM_INLINE unsigned long anonymous_namespace{cbr.cpp}::norm_dist | ( | unsigned long | a, |
unsigned long | b | ||
) |
The CBR policies can all be characterized as follows:
Return the algorithm whose name appears in the qtable row with the minimum weighted sum norm_dist
Implicit in this description is the fact that norm_dist must be defined relative to a normalization strategy. Using this norm_dist function implies that we tend to choose a qtable entry with larger number on some attribute when we have a tie in Manhattan distance. E.g., when we get a profiled read number of 4, we may only have 2 entries in the qtable, one with a read number of 3 and the other one with a read number of 5. In this case, we will choose the row with 5.
TM_FASTCALL uint32_t anonymous_namespace{cbr.cpp}::pol_CBR_RO | ( | ) |
This policy compares the read-only ratio of the current workload to the read-only ratios of entries in our qtable, using a nearest neighbor distance. Note that it does not use profiles at all.
TM_FASTCALL uint32_t anonymous_namespace{cbr.cpp}::profile_nochange | ( | ) |
A testing policy: we use this to return exactly the same algorithm as we had before a profile was run. The reason this is implemented here is just so that we have a hook in the standard place to ensure that profiles get printed.