You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Try to find out the actual hugepage size when making a MAP_HUGETLB request.
Even if Linux's mmap() is okay with a partial-hugepage request, munmap()is not, as reported by Chris Richards. Therefore it behooves us to trya bit harder to find out the actual hugepage size, instead of assumingthat we can skate by with a guess.For the moment, just look into /proc/meminfo to find out the defaulthugepage size, and use that. Later, on kernels that support requestsfor nondefault sizes, we might try to consider other alternatives.But that smells more like a new feature than a bug fix, especially ifwe want to provide any way for the DBA to control it, so leave it foranother day.I set this up to allow easy addition of platform-specific code fornon-Linux platforms, if needed; but right now there are no reportssuggesting that we need to work harder on other platforms.Back-patch to 9.4 where hugepage support was introduced.Discussion: <31056.1476303954@sss.pgh.pa.us>