Revert "hugetlb: add a new function get_available_hugepages"

This reverts commit aaacd7081379dfd2931242c374231b23cbbdea99.

As Caspar said:

1) the patchset did the similar thing with `-s` option which was added in:

7420ed0 hugemmap04: auto mount the temporary dir for testing
c4dd870 hugemmap03: auto mount the temporary dir for testing
9b4865f hugemmap02: auto mount the temporary dir for testing
d8728dc hugemmap01: auto mount the temporary dir for testing

-s opition was designed to adapt hugepage size to be allocated in small
systems. When no enough hugepages allocated, what we should do is not
fetch the "actual allocated" number, but to change our test parameter
with -s option.

2) check policy: what if system gets enough memory but fails to allocate
enough hugepage, e.g. system has >256M free mem but fails to allocate
128 hugepages? I think we're always expecting >256M free mem can
allocate 128 hugepages, but in this patch, no warning will be thrown out
if expected hugepage number is not allocated.

3) what if system doesn't allocate enough hugepage and
get_available_hugepage returns 0? IMO, In this condition, we should give
a TBROK.
17 files changed