Looking at https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt the pagesize option that is used to mount the hugepages should be set in bytes not human readable equivalent and that makes working out shmmax much easier too.
Looking at https:/ /www.kernel. org/doc/ Documentation/ vm/hugetlbpage. txt the pagesize option that is used to mount the hugepages should be set in bytes not human readable equivalent and that makes working out shmmax much easier too.