diff --git a/offloading-cacher/main.cpp b/offloading-cacher/main.cpp index b6c9714..7aa8ea0 100644 --- a/offloading-cacher/main.cpp +++ b/offloading-cacher/main.cpp @@ -37,12 +37,12 @@ int main(int argc, char **argv) { }; auto copy_policy = [](const int numa_dst_node, const int numa_src_node) { - return std::vector{ numa_src_node }; + return std::vector{ numa_src_node, numa_dst_node }; }; cache.Init(cache_policy,copy_policy); - static constexpr size_t data_size = 8192; + static constexpr size_t data_size = 1024 * 1024; double* data = GetRandomArray(data_size); std::unique_ptr data_cache = cache.Access(reinterpret_cast(data), data_size * sizeof(double), offcache::ExecutionPolicy::Relaxed); diff --git a/offloading-cacher/offloading-cache.hpp b/offloading-cacher/offloading-cache.hpp index f40ef3d..ea91fae 100644 --- a/offloading-cacher/offloading-cache.hpp +++ b/offloading-cacher/offloading-cache.hpp @@ -246,6 +246,8 @@ inline void offcache::Cache::SubmitTask(CacheData* task) { const size_t size = task->size_ / task_count; const size_t last_size = size + task->size_ % task_count; + std::cout << "[-] Splitting Copy into " << task_count << " tasks of " << size << "B 0x" << std::hex << (uint64_t)task->src_ << std::dec << std::endl; + // save the current numa node mask to restore later // as executing the copy task will place this thread // on a different node