-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
src: include large pages source unconditionally #31904
src: include large pages source unconditionally #31904
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % comments
src/large_pages/node_large_page.cc
Outdated
@@ -294,6 +296,25 @@ static bool IsSuperPagesEnabled() { | |||
} | |||
#endif | |||
|
|||
int IsLargePagesEnabled() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you name this e.g. GetLargePagesSupport()
? IsLargePagesEnabled()
suggests it returns a boolean when it doesn't.
Alternatively, you could just inline it at the call site; there's only one caller.
src/large_pages/node_large_page.cc
Outdated
struct text_region r = FindNodeTextRegion(); | ||
if (r.found_text_region == false) { | ||
PrintWarning("failed to find text region"); | ||
return -1; | ||
return ENOENT; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you drop the braces?
8a72d89
to
1ad9e86
Compare
Restrict the usage of the C preprocessor directive enabling large pages support to the large pages implementation. This cleans up the code in src/node.cc.
1ad9e86
to
2d72f17
Compare
@lundibundi @devnexen @bnoordhuis I made the requested changes, and I also made the entire implementation conditional on the preprocessor flag being defined. That is, if the flag is not defined as 1, only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I suspect the linter will complain about two long lines.
@bnoordhuis |
OTOH, |
AFAICT the failing test suite was re-run at https://ci.nodejs.org/job/node-test-commit-linux-containered/nodes=ubuntu1804_sharedlibs_shared_x64/18250/, just not updated in the statuses. |
Restrict the usage of the C preprocessor directive enabling large pages support to the large pages implementation. This cleans up the code in src/node.cc. PR-URL: #31904 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Landed in 0dff851. |
Yes, the containered jobs currently only post status on failure which means they don’t get cleared when a subsequent run passes. It’s on my list of things to look at. |
Restrict the usage of the C preprocessor directive enabling large pages support to the large pages implementation. This cleans up the code in src/node.cc. PR-URL: #31904 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Restrict the usage of the C preprocessor directive enabling large pages support to the large pages implementation. This cleans up the code in src/node.cc. PR-URL: nodejs#31904 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Restrict the usage of the C preprocessor directive enabling large pages support to the large pages implementation. This cleans up the code in src/node.cc. PR-URL: nodejs#31904 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
depends on the large pages change to land on v12.x |
Restrict the usage of the C preprocessor directive enabling large pages support to the large pages implementation. This cleans up the code in src/node.cc. Backport-PR-URL: nodejs#32092 PR-URL: nodejs#31904 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Restrict the usage of the C preprocessor directive enabling large pages support to the large pages implementation. This cleans up the code in src/node.cc. Backport-PR-URL: #32092 PR-URL: #31904 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Restrict the usage of the C preprocessor directive enabling large
pages support to the large pages implementation. This cleans up the
code in src/node.cc.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes