|
@ -191,7 +191,7 @@ namespace dsacache { |
|
|
// copy policy specifies the copy-executing nodes for a given task
|
|
|
// copy policy specifies the copy-executing nodes for a given task
|
|
|
// which allows flexibility in assignment for optimizing raw throughput
|
|
|
// which allows flexibility in assignment for optimizing raw throughput
|
|
|
// or choosing a conservative usage policy
|
|
|
// or choosing a conservative usage policy
|
|
|
typedef std::vector<int> (CopyPolicy)(const int numa_dst_node, const int numa_src_node); |
|
|
|
|
|
|
|
|
typedef std::vector<int> (CopyPolicy)(const int numa_dst_node, const int numa_src_node, const size_t data_size); |
|
|
|
|
|
|
|
|
private: |
|
|
private: |
|
|
// mutex for accessing the cache state map
|
|
|
// mutex for accessing the cache state map
|
|
@ -396,7 +396,7 @@ inline void dsacache::Cache::SubmitTask(CacheData* task, const int dst_node, con |
|
|
|
|
|
|
|
|
// querry copy policy function for the nodes to use for the copy
|
|
|
// querry copy policy function for the nodes to use for the copy
|
|
|
|
|
|
|
|
|
const std::vector<int> executing_nodes = copy_policy_function_(dst_node, src_node); |
|
|
|
|
|
|
|
|
const std::vector<int> executing_nodes = copy_policy_function_(dst_node, src_node, task->size_); |
|
|
const size_t task_count = executing_nodes.size(); |
|
|
const size_t task_count = executing_nodes.size(); |
|
|
|
|
|
|
|
|
// each task will copy one fair part of the total size
|
|
|
// each task will copy one fair part of the total size
|
|
|