Replies: 2 comments 10 replies
-
Libfork's |
Beta Was this translation helpful? Give feedback.
10 replies
-
Just make sure when compiling libfork that CMake prints something like this: Found hwloc 2.10.0rc3-git in /home/cj/libfork/build/rel/vcpkg_installed/x64-linux/lib/pkgconfig/../../include:hwloc;m;pthread hwloc is the library that libfork uses to detect the NUMA topology |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When scheduling task, numa-aware usually means one thread will consume tasks in its own pool, then get tasks from pool on the same numa node, and get tasks from the neighbour numa node finally.
While there is a situation, for example, we have 8 threads on two numa nodes ( thread 0~3 on numa node 0, and thread 4~7 on numa node 1), and we have 16 jobs.
And each job has some data, and will visit these data when run task. suppose thread 0~3 running jobs 0~7, and thread 4~7 running jobs 8~15, so data of job 0~7 are on numa node 0, and data of job 8~15 on numa node 1.
So there are two questions,
// lazy_pool or busy_pool with 8 threads;
// for loop to allocate data
for(jobId = 0; jobId < jobCount-1; ++jobId)
co_await lf::fork[ allocateDataMem](jobId);
co_await lf::call[allocateDataMem](fianlJobId);
what's the result for allocated data on which numa node ?
for(jobId = 0; jobId < jobCount - 1; ++jobI)
co_await lf::fork[ runSomeTask](jobId);
co_await lf::call[ runSomeTask](jobId);
what's the result for task running on which numa node ?
suppose all those task scheduled evenly, and very balance.
Beta Was this translation helpful? Give feedback.
All reactions