From 65622bf0e59a560a4363a9178d920303b7d4ee4c Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Sat, 14 Dec 2019 22:21:12 -0800 Subject: [PATCH] src: make --use-largepages a three-valued option --- doc/api/cli.md | 9 ++++++++- doc/node.1 | 4 +++- src/node.cc | 6 ++++-- src/node_options.cc | 3 +++ src/node_options.h | 2 +- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 4c549e3375760f..c2942d91931371 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -863,7 +863,7 @@ environment variables. See `SSL_CERT_DIR` and `SSL_CERT_FILE`. -### `--use-largepages` +### `--use-largepages=num` @@ -872,6 +872,13 @@ Re-map the Node.js static code to large memory pages at startup. If supported on the target system, this will cause the Node.js static code to be moved onto 2 MiB pages instead of 4 KiB pages. +The following values are valid for `num`: +* 0: No mapping will be attempted. This is the default. +* 1: If supported by the OS, mapping will be attempted. Failure to map will be + ignored and will not be reported. +* 2: If supported by the OS, mapping will be attempted. Failure to map will be + ignored and a message will be printed to standard error. + ### `--v8-options`