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

Linux: transparent hugepage flag logic issue #37064

Closed
jayaddison opened this issue Jan 25, 2021 · 0 comments
Closed

Linux: transparent hugepage flag logic issue #37064

jayaddison opened this issue Jan 25, 2021 · 0 comments
Labels
linux Issues and PRs related to the Linux platform.

Comments

@jayaddison
Copy link
Contributor

What steps will reproduce the bug?

Launching the node binary (when compiled with large pages support) with the --use-largepages flag enabled (either on or silent) may lead to this bug occurring.

What is the expected behavior?

Under Linux on a system where transparent hugepages are enabled (either in mode always or madvise), node launched with large pages enabled should make use of that system feature.

What do you see instead?

When --use-largepages=on (requesting non-silent operation), the following output is displayed when node is launched:

Large pages are not enabled.
Welcome to Node.js v16.0.0-pre.
Type ".help" for more information.
>

The state of transparent hugetable support can be examined on a running Linux system from a terminal by running the following command (with example output included):

$ cat /sys/kernel/mm/transparent_hugepage/enabled
always [madvise] never
@targos targos added the linux Issues and PRs related to the Linux platform. label Jan 31, 2021
danielleadams pushed a commit that referenced this issue Feb 16, 2021
There was an unexpected and hard-to-spot issue here:
the /sys/kernel/mm/transparent_hugepage/enabled file contains three
entries, and the std::ifstream reader was reading two values on each
loop iteration, resulting in incorrect behaviour.

Fixes: #37064

PR-URL: #37065
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this issue May 1, 2021
There was an unexpected and hard-to-spot issue here:
the /sys/kernel/mm/transparent_hugepage/enabled file contains three
entries, and the std::ifstream reader was reading two values on each
loop iteration, resulting in incorrect behaviour.

Fixes: #37064

PR-URL: #37065
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linux Issues and PRs related to the Linux platform.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants