summaryrefslogtreecommitdiff
path: root/src/large_pages
AgeCommit message (Collapse)Author
2019-11-07src: do not use `std::function` for `OnScopeLeave`Anna Henningsen
Using `std::function` adds an extra layer of indirection, and in particular, heap allocations that are not necessary in our use case here. PR-URL: https://github.com/nodejs/node/pull/30134 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-10-16src: refine maps parsing for large pagesGabriel Schulhof
Multiple sections may be marked as "r-xp" and with the executable's path. We use the location of the `__nodetext` symbol added by the linker script to ensure that the range we retrieve from the maps file does indeed contain the Node.js text section. Thanks to Suresh Srinivas <suresh.srinivas@intel.com>! PR-URL: https://github.com/nodejs/node/pull/29973 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
2019-10-11src: fix largepages regressionGabriel Schulhof
During the addition of macOS support for large pages, a `memcpy` ended up under the wrong preprocessor directive. As a result, the newly allocated large pages were not initialized with a copy of the text section. Thanks to Suresh Srinivas <suresh.srinivas@intel.com>! PR-URL: https://github.com/nodejs/node/pull/29914 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
2019-08-20src: add large page support for macOSDavid Carlier
Proposal to bring the support for this platform. We assume the pse36 cpu flag is present for 2MB large page support present in recent years in mac line (not to be backported to 10.x anyway). Recommended better for mac production servers rather than casual mac books. PR-URL: https://github.com/nodejs/node/pull/28977 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-19build: enable linux large pages LLVM lld linkage supportDavid Carlier
The custom linker script is compatible with GNU ld only. As such, providin a new expliciting option to redirect to a different one. lld seems unable to migrate this large section w/o segfaulting so providing only the base address anchor for now. PR-URL: https://github.com/nodejs/node/pull/28938 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-07-30src: large pages fix FreeBSD fix region sizeDavid Carlier
Makes the size aligned to huge page size by calculating it from the aligned lower and upper boundary of the executable address. PR-URL: https://github.com/nodejs/node/pull/28735 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-30src: readlink("/proc/self/exe") -> uv_exename()Ben Noordhuis
This commit also adds error handling. A THP-enabled build terminated with an out-of-memory error on a system without /proc because it cast the -1 from readlink() to size_t (i.e. ULONG_MAX) and then tried to allocate a string of that size. PR-URL: https://github.com/nodejs/node/pull/28333 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-07-15src: large pages option: FreeBSD support proposalDavid Carlier
Enabling on amd64 and as Linux, are 2MB large. The ELF section linkage script is compatible only with GNU ld. PR-URL: https://github.com/nodejs/node/pull/28331 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-04-26src: apply clang-tidy modernize-deprecated-headers found by Jenkins CIgengjiawen
PR-URL: https://github.com/nodejs/node/pull/27279 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-03-12src: de-lint header usageRefael Ackermann
PR-URL: https://github.com/nodejs/node/pull/26306 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-10-31src: fix fully-static & large-pages combinationSuresh Srinivas
Fixes: https://github.com/nodejs/node/issues/23906 Refs: https://github.com/nodejs/node/pull/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: https://github.com/nodejs/node/pull/23964 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-10-18src: initial large page (2M) supportSuresh Srinivas
PR-URL: https://github.com/nodejs/node/pull/22079 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>