-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to make fastmap support more cpu cores than 32 or 80 #1
Comments
Regarding shared_defines.h you should only change NUM_FREELISTS and NUM_QUEUES to be equals to the number of cores (256 in your case). FastMap/driver/mmap_buffer_hash_table.c Line 135 in 06a2c93
FastMap/driver/mmap_buffer_hash_table.c Line 16 in 06a2c93
Feel free to provide a pull request with a more generic way to produce these arrays. Depending on the throughput of your device you may increase a little bit the EVICTOR_THREADS define in shared_defines.h (i.e. 16 or 32). But this will require some testing to do find out the most appropriate value. I believe it is fine to start with 8. Please let me know if anything is not clear or you encounter any more issues. |
Hi, I actually have a patch which modifies the page allocation mechanism to be NUMA aware and work with any core number. I will try to commit it by tonight. However, there are a couple more issues which need to be addressed in order to support 256 cores. The main issue lies with our reverse mapping structure, which stores all the mappings established for a page, and is defined here Line 16 in 06a2c93
The __vaddr field is used to store the virtual address associated with the reverse mapping. As these addresses are page-aligned we can use the 12 least significant bits in __vaddr to store metadata, namely the core number with which the mapping is associated (see here Line 209 in 06a2c93
Line 25 in 06a2c93
Finally, you would have to modify the structures in dmap.h which are hardcoded to support at most 128 cores, namely struct pr_vma_entry and struct pr_vma_data, and replace 128 with 256. Hope this helps, feel free to ask if you encounter any other problems. |
I followed @tpapagian 's comment and successfully ran on 128 cores if I disabled the half cores (hyper-threading actually) in BIOS. The random read workload from For 256 cores, I changed
|
I have also added the patches for NUMA aware allocations. Just set NUM_FREELISTS to anything other than 1 in shared_defines.h. The value does not matter because we use the return value of num_online_cpus(). I'll have a look at the log you posted. |
I tried to run FastMap on a server with 256 cores, and FastMap crashed at
alloc_page_lock
. I read the code and found that FastMap only supports 32 and 80 freelists (or cores) according tommap_buffer_hash_table.c
shown below. How to make it variable? I am also confused about setting constants inshared_defines.h
? Could you show a correct setting with 256 cores? Thank you.FastMap/driver/mmap_buffer_hash_table.c
Line 135 in 06a2c93
FastMap/driver/mmap_buffer_hash_table.c
Line 280 in 06a2c93
The text was updated successfully, but these errors were encountered: