Anyone knows why Mayastor io-engine is using magic number 512 to check if there are enough huge pages? #3762
-
This is the specific line used for checking if there are enough huge pages: if nr_pages + nr_1g_pages * 512 < PAGES_NEEDED {
# ...
According Mayastor's installation guide, it requires a minimum of 2GiB of 2MiB-sized pages. If my math is correct, the requirement is to have 1024 pages, which is exactly what's configured in: const PAGES_NEEDED: u32 = 1024;
I cannot figure out expression Am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Probably not the clearest piece of code. |
Beta Was this translation helpful? Give feedback.
Probably not the clearest piece of code.
1page of 1GiB pages is equivalent to 512 pages of 2MiB pages