advise out more stacks when not using huge pages
commitdb88d2e804287441980476acee873fe5a464d318
authorBin Liu <binliu@fb.com>
Sat, 4 Aug 2018 22:14:46 +0000 (4 15:14 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Sat, 4 Aug 2018 22:27:44 +0000 (4 15:27 -0700)
treebdac65e0cef73d2e2a652c858c2abafb06a13b92
parent0811d2891e451c13c90f984aa4b34b54defb4cf1
advise out more stacks when not using huge pages

Summary:
I had to align at 2M previously, to avoid the crash when trying to advise out a partial huge page (we used to call abort()) upon the failure.
This adds back proper accounting for per-thread huge page usage, and use the information when we advising out the stack in idle threads.

Reviewed By: markw65

Differential Revision: D9132883

fbshipit-source-id: f0fcdff02c75d805397def659eece5ad28e0fa60
hphp/util/alloc.cpp
hphp/util/alloc.h
hphp/util/async-func.cpp
hphp/util/async-func.h
hphp/util/job-queue.h