Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Huge pages #5269

Closed
paulbiss opened this issue May 7, 2015 · 7 comments
Closed

Huge pages #5269

paulbiss opened this issue May 7, 2015 · 7 comments
Assignees

Comments

@paulbiss
Copy link
Contributor

paulbiss commented May 7, 2015

These are only turned on for internal kernels, we should enable them when supported externally.

@paulbiss paulbiss self-assigned this May 8, 2015
@paulbiss
Copy link
Contributor Author

I think I've got this partially working. I'm not seeing anything measurable from huge pages in the JIT, but I haven't gotten hugifyText working for hot runtime functions yet.

@wjywbs
Copy link
Contributor

wjywbs commented Jun 15, 2015

How's your progress? I replaced hash_string_cs_fallback with simply return hash_string_cs_unaligned_crc(arKey, nKeyLength); and saw 1-2% improvement. It would be beneficial to get copyHashFuncs working.

strhash_t hash_string_i_fallback(const char *arKey, uint32_t nKeyLength) {

@paulbiss
Copy link
Contributor Author

@wjywbs I had some issues with mapping the text section, I'll see if I can take another swing at it this week. Thanks for the update!

@markw65
Copy link
Contributor

markw65 commented Jun 15, 2015

We should definitely get the huge page thing working, but we should also probably add a compilation option to just use the sse4 version of the crc code, rather than trying to dynamically patch it. Most people will either want it on, or want it off (rather than having a mix of machines, some with, and some without sse4).

@Orvid Orvid closed this as completed Jul 27, 2016
@octmoraru
Copy link
Contributor

@paulbiss What was the outcome of this effort? Were you able to make it work or was it dropped?

@paulbiss
Copy link
Contributor Author

@octmoraru we bulk closed a bunch of lockdown issues, we haven't done this yet and we definitely should.

@paulbiss paulbiss reopened this Jul 29, 2016
@Orvid Orvid assigned Orvid and unassigned paulbiss Sep 30, 2016
octmoraru added a commit to octmoraru/hhvm that referenced this issue Jun 29, 2017
This diff enables mapping of hot static code onto huge pages for open
source builds. It defines __hot_start and __hot_end at link time using
the first and last functions from the linker script. This feature can be
turned off by setting the CMake option MAP_TEXT_HUGE_PAGES to 'Off'.

hugifyText was aligned to 2MB so that we maximize the amount of hot code
we can map if __hot_end is placed just before it.

Solves facebook#5269
@lexidor
Copy link
Collaborator

lexidor commented Aug 29, 2023

I am going over old issues on this repository, to see which ones apply to the current versions of hhvm.

The last comment in #9063 confirms the huge page support:

(in order to make use of the optimization you need to configure the kernel to make huge pages available at boot time, and most users won't want this).

@lexidor lexidor closed this as completed Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants