Skip to content

src: fix fully-static and large-pages combination - #23964

Closed
suresh-srinivas wants to merge 1 commit into
nodejs:masterfrom
suresh-srinivas:fully-static-large-pages
Closed

src: fix fully-static and large-pages combination#23964
suresh-srinivas wants to merge 1 commit into
nodejs:masterfrom
suresh-srinivas:fully-static-large-pages

Conversation

@suresh-srinivas

@suresh-srinivassuresh-srinivas commented Oct 30, 2018

Copy link
Copy Markdown
Contributor

Fixes: #23906
Refs: #22079

This change to ld.implicit.script moves libc static code to
.lpstub area and avoids the issue detailed in 23906

Quick performance comparision on web-tooling shows 3%
improvement for the combination over fully-static

 fully-static-lp fully-static
cycles 376,235,487,455 390,007,877,315
instructions 700,341,146,973 714,773,201,182
itlb_misses_walk_completed 20,654,246 28,908,381
itlb_misses_walk_completed_4k 19,884,666 28,865,118
itlb_misses_walk_completed_2m_4m 769,391 43,251
Score 9.13 8.86
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Oct 30, 2018
@suresh-srinivas

Copy link
Copy Markdown
ContributorAuthor

This doesnt seem to be related to this checkin. ENOSPC? @addaleax@refack@lundibundi could one of you help?

=== release test-fseventwrap ===
Path: async-hooks/test-fseventwrap
internal/fs/watchers.js:173
throw error;
Error: ENOSPC: System limit for number of file watchers reached, watch '/home/travis/build/nodejs/node/test/async-hooks/test-fseventwrap.js'
at FSWatcher.start (internal/fs/watchers.js:165:26)
at Object.watch (fs.js:1274:11)
at Object.<anonymous> (/home/travis/build/nodejs/node/test/async-hooks/test-fseventwrap.js:16:20)
at Module._compile (internal/modules/cjs/loader.js:707:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
at Module.load (internal/modules/cjs/loader.js:605:32)
at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
at Function.Module._load (internal/modules/cjs/loader.js:536:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:760:12)
at startup (internal/bootstrap/node.js:308:19)
Command: out/Release/node /home/travis/build/nodejs/node/test/async-hooks/test-fseventwrap.js
[06:56|% 100|+ 2453|- 1]: Done
make[1]: *** [jstest] Error 1
make: *** [test] Error 2

@refack

refack commented Oct 30, 2018

Copy link
Copy Markdown
Contributor
 === release test-fseventwrap ===
Path: async-hooks/test-fseventwrap internal/fs/watchers.js:173
throw error;

This is a Travis flake (funny coincidence, I was just looking at a WIP for a fix in the next tab #22589)
CI: https://ci.nodejs.org/job/node-test-pull-request/18221/

@refackrefack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSLGTM

@bnoordhuisbnoordhuis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % nit.

I'm curious though what the ramifications are of linking in libc.a with non-static builds. Did you test that still works?

Comment threadsrc/large_pages/ld.implicit.script Outdated
@suresh-srinivas

Copy link
Copy Markdown
ContributorAuthor

@bnoordhuis this change has been tested on dynamic link builds where libc.a is not linked and this is a noop. What this rule in the linker script is doing is if libc.a is linked in, it places it in the .lpstub section outside the .text.

@suresh-srinivas

suresh-srinivas commented Oct 30, 2018

Copy link
Copy Markdown
ContributorAuthor

Looks like I messed something up when I try to resolve a conflict. I dont know how those other commits got in here. I think I have fixed it following the contributors guide.

@refack

Copy link
Copy Markdown
Contributor

@refackrefack added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 30, 2018
@suresh-srinivas

Copy link
Copy Markdown
ContributorAuthor

@refack the test failure on Ubuntu 16.04 ARM is not related to this checkin

https://ci.nodejs.org/job/node-test-commit-arm/nodes=ubuntu1604-arm64/lastFailedBuild/testReport/junit/(root)/test/parallel_test_fs_readfile/

Fixes: nodejs#23906
Refs: nodejs#22079
This change to ld.implicit.script moves libc static code to
.lpstub area and avoids the issue detailed in 23906
Quick performance comparision on web-tooling shows 3%
improvement for the combination over fully-static
cycles 376,235,487,455 390,007,877,315
instructions 700,341,146,973 714,773,201,182
itlb_misses_walk_completed 20,654,246 28,908,381
itlb_misses_walk_completed_4k 19,884,666 28,865,118
itlb_misses_walk_completed_2m_4m 769,391 43,251
Score 9.13 8.86
@refack

refack commented Oct 30, 2018

Copy link
Copy Markdown
Contributor

Probably. I've triggered a rerun of that platform: https://ci.nodejs.org/job/node-test-pull-request/18243/
If it doesn't fail again we'll mark it as "flaky".

@suresh-srinivas

Copy link
Copy Markdown
ContributorAuthor

There is a PR 23861 to backport the original code to v10.x-staging. Should I raise another PR for this fix or can it be cherry picked as part of that?

@refack

Copy link
Copy Markdown
Contributor

Since #23861 is still open, IMHO it's best to streamline this into #23861, once this lands.

@refack

Copy link
Copy Markdown
Contributor

Landed in d32b5bd

@refackrefack closed this Nov 1, 2018
pullBot pushed a commit to SimenB/node that referenced this pull request Nov 1, 2018
Fixes: nodejs#23906
Refs: nodejs#22079
This change to ld.implicit.script moves libc static code to
.lpstub area and avoids the issue detailed in 23906
Quick performance comparision on web-tooling shows 3%
improvement for the combination over fully-static
cycles 376,235,487,455 390,007,877,315
instructions 700,341,146,973 714,773,201,182
itlb_misses_walk_completed 20,654,246 28,908,381
itlb_misses_walk_completed_4k 19,884,666 28,865,118
itlb_misses_walk_completed_2m_4m 769,391 43,251
Score 9.13 8.86
PR-URL: nodejs#23964
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@refackrefack removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 1, 2018
@suresh-srinivas

Copy link
Copy Markdown
ContributorAuthor

Landed in d32b5bd

Thanks @refack@bnoordhuis . Appreciate your support and patience in getting this fixed.

targos pushed a commit that referenced this pull request Nov 2, 2018
Fixes: #23906
Refs: #22079
This change to ld.implicit.script moves libc static code to
.lpstub area and avoids the issue detailed in 23906
Quick performance comparision on web-tooling shows 3%
improvement for the combination over fully-static
cycles 376,235,487,455 390,007,877,315
instructions 700,341,146,973 714,773,201,182
itlb_misses_walk_completed 20,654,246 28,908,381
itlb_misses_walk_completed_4k 19,884,666 28,865,118
itlb_misses_walk_completed_2m_4m 769,391 43,251
Score 9.13 8.86
PR-URL: #23964
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@BridgeARBridgeAR mentioned this pull request Nov 14, 2018
@MylesBorins

Copy link
Copy Markdown
Contributor

I've gone ahead and backported to v10.x. I've opted to mark both #22079 and this PR as don't land on 8.x. If someone doesn't agree with that please feel free to chime in or open a backport

MylesBorins pushed a commit that referenced this pull request Nov 27, 2018
Fixes: #23906
Refs: #22079
This change to ld.implicit.script moves libc static code to
.lpstub area and avoids the issue detailed in 23906
Quick performance comparision on web-tooling shows 3%
improvement for the combination over fully-static
cycles 376,235,487,455 390,007,877,315
instructions 700,341,146,973 714,773,201,182
itlb_misses_walk_completed 20,654,246 28,908,381
itlb_misses_walk_completed_4k 19,884,666 28,865,118
itlb_misses_walk_completed_2m_4m 769,391 43,251
Score 9.13 8.86
PR-URL: #23964
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@codebyterecodebytere mentioned this pull request Nov 27, 2018
@suresh-srinivas

Copy link
Copy Markdown
ContributorAuthor

I've gone ahead and backported to v10.x. I've opted to mark both #22079 and this PR as don't land on 8.x. If someone doesn't agree with that please feel free to chime in or open a backport

Thank you @MylesBorins for the backport to v10.x. Agree on your suggestion for don't land on 8.x

rvagg pushed a commit that referenced this pull request Nov 28, 2018
Fixes: #23906
Refs: #22079
This change to ld.implicit.script moves libc static code to
.lpstub area and avoids the issue detailed in 23906
Quick performance comparision on web-tooling shows 3%
improvement for the combination over fully-static
cycles 376,235,487,455 390,007,877,315
instructions 700,341,146,973 714,773,201,182
itlb_misses_walk_completed 20,654,246 28,908,381
itlb_misses_walk_completed_4k 19,884,666 28,865,118
itlb_misses_walk_completed_2m_4m 769,391 43,251
Score 9.13 8.86
PR-URL: #23964
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Nov 29, 2018
Fixes: #23906
Refs: #22079
This change to ld.implicit.script moves libc static code to
.lpstub area and avoids the issue detailed in 23906
Quick performance comparision on web-tooling shows 3%
improvement for the combination over fully-static
cycles 376,235,487,455 390,007,877,315
instructions 700,341,146,973 714,773,201,182
itlb_misses_walk_completed 20,654,246 28,908,381
itlb_misses_walk_completed_4k 19,884,666 28,865,118
itlb_misses_walk_completed_2m_4m 769,391 43,251
Score 9.13 8.86
PR-URL: #23964
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@codebyterecodebytere mentioned this pull request Nov 29, 2018
MylesBorins pushed a commit that referenced this pull request Dec 3, 2018
Fixes: #23906
Refs: #22079
This change to ld.implicit.script moves libc static code to
.lpstub area and avoids the issue detailed in 23906
Quick performance comparision on web-tooling shows 3%
improvement for the combination over fully-static
cycles 376,235,487,455 390,007,877,315
instructions 700,341,146,973 714,773,201,182
itlb_misses_walk_completed 20,654,246 28,908,381
itlb_misses_walk_completed_4k 19,884,666 28,865,118
itlb_misses_walk_completed_2m_4m 769,391 43,251
Score 9.13 8.86
PR-URL: #23964
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Combination of large pages and fully static does not work

6 participants

@suresh-srinivas@refack@MylesBorins@bnoordhuis@BethGriggs@nodejs-github-bot